client_data 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Guardfile +1 -1
- data/lib/client_data/methods.rb +13 -0
- data/lib/client_data/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b77b38f242c33313c81c3c579bbfe30229161dee
|
|
4
|
+
data.tar.gz: dcc8bc8a3e9ad02e03e928243892b4908db83363
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8ce478718d026cc072894ef31dac61c87efad4f34c0b2b6641eae907c6719b2cebb0975c06268511b096c6f0b0953a901c94f0bef554caf5e4f4a9fa6b0a575b
|
|
7
|
+
data.tar.gz: 9fcb99d33e6e9991e4905a3d24055e49b49af2270b535478b2ac0473ecb45d36e59e047d911d568cc8683cd3e9412d943b8828dea9366019ebb2dfef97683c38
|
data/Guardfile
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# A sample Guardfile
|
|
2
2
|
# More info at https://github.com/guard/guard#readme
|
|
3
3
|
|
|
4
|
-
guard :rspec
|
|
4
|
+
guard :rspec do
|
|
5
5
|
watch(%r{^spec/.+_spec\.rb$})
|
|
6
6
|
watch(%r{^lib/hey_presto/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
|
7
7
|
watch('spec/spec_helper.rb') { "spec" }
|
data/lib/client_data/methods.rb
CHANGED
|
@@ -42,8 +42,21 @@ module ClientData
|
|
|
42
42
|
end
|
|
43
43
|
end
|
|
44
44
|
|
|
45
|
+
def condition_satisfied?(options)
|
|
46
|
+
if cond = options[:if]
|
|
47
|
+
if cond.respond_to?(:call)
|
|
48
|
+
cond.call(self)
|
|
49
|
+
else
|
|
50
|
+
cond
|
|
51
|
+
end
|
|
52
|
+
else
|
|
53
|
+
true
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
45
57
|
def should_build_for?(key)
|
|
46
58
|
options = builder_options_hash[key] || {}
|
|
59
|
+
return false unless condition_satisfied?(options)
|
|
47
60
|
action = self.action_name.to_sym
|
|
48
61
|
only = options[:only]
|
|
49
62
|
if only.nil?
|
data/lib/client_data/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: client_data
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stan Bondi
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-
|
|
11
|
+
date: 2014-07-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -93,9 +93,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
93
93
|
version: '0'
|
|
94
94
|
requirements: []
|
|
95
95
|
rubyforge_project:
|
|
96
|
-
rubygems_version: 2.2.
|
|
96
|
+
rubygems_version: 2.2.2
|
|
97
97
|
signing_key:
|
|
98
98
|
specification_version: 4
|
|
99
99
|
summary: Use builder classes to build up data which JS can use.
|
|
100
100
|
test_files: []
|
|
101
|
-
has_rdoc:
|