Merge branch 'staging' into email_encoding_issues

pull/899/head
Rick Carlino 2018-06-26 18:24:22 -05:00 committed by GitHub
commit e7e19b6481
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 23 additions and 27 deletions

View File

@ -8,7 +8,7 @@ gem "delayed_job"
gem "devise"
gem "discard"
gem "figaro"
gem "fog-google", git: "https://github.com/fog/fog-google"
gem "fog-google", "1.6.0"
gem "font-awesome-rails"
gem "foreman"
gem "jwt"

View File

@ -4,16 +4,6 @@ GIT
specs:
smarf_doc (1.0.0)
GIT
remote: https://github.com/fog/fog-google
revision: ba3ff45d3809f4d7f8281a8a72fdf18bdc6c2ea1
specs:
fog-google (1.6.0)
fog-core
fog-json
fog-xml
google-api-client (~> 0.23.0)
GEM
remote: https://rubygems.org/
specs:
@ -71,7 +61,7 @@ GEM
builder (3.2.3)
bunny (2.11.0)
amq-protocol (~> 2.3.0)
capybara (3.2.1)
capybara (3.3.0)
addressable
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
@ -130,6 +120,11 @@ GEM
excon (~> 0.58)
formatador (~> 0.2)
mime-types
fog-google (1.6.0)
fog-core
fog-json
fog-xml
google-api-client (~> 0.23.0)
fog-json (1.2.0)
fog-core
multi_json (~> 1.10)
@ -208,7 +203,7 @@ GEM
mime-types
mimemagic (~> 0.3.0)
terrapin (~> 0.6.0)
passenger (5.3.2)
passenger (5.3.3)
rack
rake (>= 0.8.1)
pg (1.0.0)
@ -221,7 +216,7 @@ GEM
pry (>= 0.10.4)
public_suffix (3.0.2)
rack (2.0.5)
rack-attack (5.3.1)
rack-attack (5.3.2)
rack
rack-cors (1.0.2)
rack-test (1.0.0)
@ -300,7 +295,7 @@ GEM
activerecord (>= 4.0.0)
railties (>= 4.0.0)
secure_headers (6.0.0)
selenium-webdriver (3.12.0)
selenium-webdriver (3.13.0)
childprocess (~> 0.5)
rubyzip (~> 1.2)
signet (0.8.1)
@ -365,7 +360,7 @@ DEPENDENCIES
factory_bot_rails
faker
figaro
fog-google!
fog-google (= 1.6.0)
font-awesome-rails
foreman
hashdiff

View File

@ -1,5 +1,5 @@
<% if (response.success? || note.present?) %>
# <%= response.success? ? "" : "(NOT OK)" %> <%= request.pretty_url %>
<% if (response.successful? || note.present?) %>
# <%= response.successful? ? "" : "(NOT OK)" %> <%= request.pretty_url %>
<% if note.present? %>
**Notes:** <%= note %>
<% end %>

View File

@ -1,3 +1,3 @@
class SensorReadingSerializer < ActiveModel::Serializer
attributes :id, :pin, :value, :x, :y, :z
attributes :id, :created_at, :pin, :value, :x, :y, :z
end

View File

@ -14,14 +14,15 @@ describe Api::SensorReadingsController do
body: { pin: 13, value: 128, x: nil, y: 1, z: 2 }.to_json,
params: { format: :json }
expect(response.status).to eq(200)
expect(json[:id]).to be_kind_of(Integer)
expect(json[:value]).to eq(128)
expect(json[:device_id]).to eq(nil) # Use the serializer, not as_json.
expect(json[:x]).to eq(nil)
expect(json[:y]).to eq(1)
expect(json[:z]).to eq(2)
expect(json[:pin]).to eq(13)
expect(response.status).to eq(200)
expect(json[:id]).to be_kind_of(Integer)
expect(json[:created_at]).to be_kind_of(String)
expect(json[:value]).to eq(128)
expect(json[:device_id]).to eq(nil) # Use the serializer, not as_json.
expect(json[:x]).to eq(nil)
expect(json[:y]).to eq(1)
expect(json[:z]).to eq(2)
expect(json[:pin]).to eq(13)
expect(before < SensorReading.count).to be_truthy
end