client_data 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 11f350caa58a1d9912dbf17d79541886b0ff30dd
4
- data.tar.gz: aa876738e11ba40782ba84cf50ff4c82417c5f5c
3
+ metadata.gz: b77b38f242c33313c81c3c579bbfe30229161dee
4
+ data.tar.gz: dcc8bc8a3e9ad02e03e928243892b4908db83363
5
5
  SHA512:
6
- metadata.gz: 509626eced24f1ed1cf92d92da9a6f76830b63ded9bdbb62cb69d9e3eef5bcd0f098631900d999ddef064213bb920b337188a980d7ac7360803d3a36e9a02e5c
7
- data.tar.gz: acc3f301f35175dfd8a529d214e7065c5f2006964e0d5c17c6ba45dbc049d8f8f2f5df5bf92487ae6a7dcf09de7652f11b3e54c3f658d4761b153ad19f7b49f9
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, cmd: 'rspec -d .' do
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" }
@@ -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?
@@ -1,3 +1,3 @@
1
1
  module ClientData
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
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.0
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-06-03 00:00:00.000000000 Z
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.0
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: