confetti 0.6.2 → 0.6.3

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.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- confetti (0.6.2)
4
+ confetti (0.6.3)
5
5
  mustache (~> 0.11.2)
6
6
 
7
7
  GEM
@@ -171,5 +171,9 @@ module Confetti
171
171
  name = name.to_s
172
172
  @preference_set.detect { |pref| pref.name == name }
173
173
  end
174
+
175
+ def full_access?
176
+ @access_set.detect { |a| a.origin == '*' }
177
+ end
174
178
  end
175
179
  end
@@ -1,3 +1,3 @@
1
1
  module Confetti
2
- VERSION = "0.6.2"
2
+ VERSION = "0.6.3"
3
3
  end
data/spec/config_spec.rb CHANGED
@@ -508,4 +508,25 @@ describe Confetti::Config do
508
508
  @config.preference(:privacy).should be_nil
509
509
  end
510
510
  end
511
+
512
+ describe "full_access?" do
513
+ before do
514
+ @config = Confetti::Config.new
515
+ end
516
+
517
+ it "should be false with an empty access set" do
518
+ @config.full_access?.should be_false
519
+ end
520
+
521
+ it "should be true when origin='*' is in there" do
522
+ @config.access_set << Confetti::Config::Access.new('*')
523
+ @config.full_access?.should be_true
524
+ end
525
+
526
+ it "should be false with only other origins" do
527
+ @config.access_set << Confetti::Config::Access.new('http://mysite.com')
528
+ @config.access_set << Confetti::Config::Access.new('http://myothersite.com')
529
+ @config.full_access?.should be_false
530
+ end
531
+ end
511
532
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 6
8
- - 2
9
- version: 0.6.2
8
+ - 3
9
+ version: 0.6.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Andrew Lunny