one-eye-eater 0.1.17 → 0.1.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/api.rb +5 -1
- data/lib/models/base.rb +2 -9
- data/lib/models/insights/{snapshot_suggested_groups.rb → snapshot_suggested_group.rb} +1 -1
- data/one-eye-eater.gemspec +5 -5
- data/spec/models/base_spec.rb +2 -2
- data/spec/spec_helper.rb +1 -1
- data/spec/{mock_urls.rb → support/mock_urls.rb} +0 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1cbafab304a7fe6beecdb28c0e63c7370671cf4
|
4
|
+
data.tar.gz: a6e5007b600d0666fc7ee30655de8e538184df1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8914f5ee882484544264953542af3661571ea376eb4afbb05fe150b32879f88b47cf049cd8a35645109de6e92e4f7d96b1dbc950e955f3424e4661a9ea3d343
|
7
|
+
data.tar.gz: 3786ee3af10cce47079fa8aae30d00133fb67a8a5dd2de392aad74c24e9373a12cbaffde8a90a301dca8827f808781c6da6a8e60374390b7c4232984b7b189cf
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.19
|
data/lib/api.rb
CHANGED
@@ -51,6 +51,10 @@ module OneEye
|
|
51
51
|
[name, options]
|
52
52
|
end
|
53
53
|
|
54
|
+
def symbolize_keys(hash)
|
55
|
+
hash.inject({}) { |h, (k, v)| h[k.to_sym] = v; h }
|
56
|
+
end
|
57
|
+
|
54
58
|
def standardize_options(options={})
|
55
59
|
if options.class == Fixnum
|
56
60
|
options = {id: options}
|
@@ -59,7 +63,7 @@ module OneEye
|
|
59
63
|
@options[:query] = @options[:query].merge(options)
|
60
64
|
@options[:body] = options.to_json
|
61
65
|
@options[:headers] = {"Content-Type"=>"application/json"}
|
62
|
-
@options
|
66
|
+
symbolize_keys(@options)
|
63
67
|
end
|
64
68
|
end
|
65
69
|
end
|
data/lib/models/base.rb
CHANGED
@@ -52,12 +52,12 @@ module OneEye
|
|
52
52
|
|
53
53
|
def update(attributes={})
|
54
54
|
self.attributes = attributes
|
55
|
-
self.attributes = api.put(resources_url,
|
55
|
+
self.attributes = api.put(resources_url, self.attributes)
|
56
56
|
self
|
57
57
|
end
|
58
58
|
|
59
59
|
def destroy
|
60
|
-
api.delete resources_url,
|
60
|
+
api.delete resources_url, attributes
|
61
61
|
end
|
62
62
|
|
63
63
|
def delete
|
@@ -81,13 +81,6 @@ module OneEye
|
|
81
81
|
end
|
82
82
|
end
|
83
83
|
|
84
|
-
def non_nil_attributes
|
85
|
-
instance_variables.inject Hash.new do |obj, key|
|
86
|
-
obj[key.to_s[1..-1].to_sym] = instance_variable_get(key) unless instance_variable_get(key).nil?
|
87
|
-
obj
|
88
|
-
end
|
89
|
-
end
|
90
|
-
|
91
84
|
def api
|
92
85
|
self.class.api
|
93
86
|
end
|
data/one-eye-eater.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: one-eye-eater 0.1.
|
5
|
+
# stub: one-eye-eater 0.1.19 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "one-eye-eater"
|
9
|
-
s.version = "0.1.
|
9
|
+
s.version = "0.1.19"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
@@ -35,16 +35,16 @@ Gem::Specification.new do |s|
|
|
35
35
|
"lib/models/group_membership.rb",
|
36
36
|
"lib/models/insights/insights.rb",
|
37
37
|
"lib/models/insights/snapshot_performance.rb",
|
38
|
-
"lib/models/insights/
|
38
|
+
"lib/models/insights/snapshot_suggested_group.rb",
|
39
39
|
"lib/models/insights/snapshot_usage.rb",
|
40
40
|
"lib/models/school.rb",
|
41
41
|
"lib/models/user.rb",
|
42
42
|
"lib/one-eye-eater.rb",
|
43
43
|
"one-eye-eater.gemspec",
|
44
|
-
"spec/mock_urls.rb",
|
45
44
|
"spec/models/base_spec.rb",
|
46
45
|
"spec/one_eye_spec.rb",
|
47
|
-
"spec/spec_helper.rb"
|
46
|
+
"spec/spec_helper.rb",
|
47
|
+
"spec/support/mock_urls.rb"
|
48
48
|
]
|
49
49
|
s.homepage = "http://github.com/brettshollenberger/one-eye-eater"
|
50
50
|
s.licenses = ["MIT"]
|
data/spec/models/base_spec.rb
CHANGED
@@ -33,7 +33,7 @@ describe OneEye::Base do
|
|
33
33
|
end
|
34
34
|
|
35
35
|
it "replaces module names with URLs", :deep_module_nesting do
|
36
|
-
expect(OneEye::Insights::
|
36
|
+
expect(OneEye::Insights::SnapshotSuggestedGroup.find(55).school_id).to eq(406879)
|
37
37
|
end
|
38
38
|
|
39
39
|
it "dynamically dispatches custom finders", :finders do
|
@@ -53,7 +53,7 @@ describe OneEye::Base do
|
|
53
53
|
@district = OneEye::District.create(:name => "YMCMB District")
|
54
54
|
end
|
55
55
|
|
56
|
-
it "creates instance via a backend post" do
|
56
|
+
it "creates instance via a backend post", :destroy do
|
57
57
|
expect(@district.name).to eq("YMCMB District")
|
58
58
|
@district.destroy
|
59
59
|
end
|
data/spec/spec_helper.rb
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: one-eye-eater
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brett Shollenberger
|
@@ -202,16 +202,16 @@ files:
|
|
202
202
|
- lib/models/group_membership.rb
|
203
203
|
- lib/models/insights/insights.rb
|
204
204
|
- lib/models/insights/snapshot_performance.rb
|
205
|
-
- lib/models/insights/
|
205
|
+
- lib/models/insights/snapshot_suggested_group.rb
|
206
206
|
- lib/models/insights/snapshot_usage.rb
|
207
207
|
- lib/models/school.rb
|
208
208
|
- lib/models/user.rb
|
209
209
|
- lib/one-eye-eater.rb
|
210
210
|
- one-eye-eater.gemspec
|
211
|
-
- spec/mock_urls.rb
|
212
211
|
- spec/models/base_spec.rb
|
213
212
|
- spec/one_eye_spec.rb
|
214
213
|
- spec/spec_helper.rb
|
214
|
+
- spec/support/mock_urls.rb
|
215
215
|
homepage: http://github.com/brettshollenberger/one-eye-eater
|
216
216
|
licenses:
|
217
217
|
- MIT
|