pebbles-uid 0.0.7 → 0.0.8

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.
@@ -1,5 +1,5 @@
1
1
  module Pebbles
2
2
  class Uid
3
- VERSION = "0.0.7"
3
+ VERSION = "0.0.8"
4
4
  end
5
5
  end
data/lib/pebbles-uid.rb CHANGED
@@ -18,14 +18,6 @@ module Pebbles
18
18
  [genus, path, oid.empty? ? nil : oid]
19
19
  end
20
20
 
21
- def copy(uid, replacements = {})
22
- _genus, _path, _oid = parse(uid)
23
- genus = replacements.fetch(:genus) { _genus }
24
- path = replacements.fetch(:path) { _path }
25
- oid = replacements.fetch(:oid) { _oid }
26
- new build(genus, path, oid)
27
- end
28
-
29
21
  def build(genus, path, oid)
30
22
  s = "#{genus}:#{path}"
31
23
  s << "$#{oid}" if oid
data/spec/uid_spec.rb CHANGED
@@ -30,20 +30,6 @@ describe Pebbles::Uid do
30
30
  end
31
31
  end
32
32
 
33
- context "when cloning" do
34
- it "replaces genus" do
35
- Pebbles::Uid.copy('post:a.b.c$123', :genus => 'page').to_s.should == 'page:a.b.c$123'
36
- end
37
-
38
- it "replaces path" do
39
- Pebbles::Uid.copy('post:a.b.c$123', :path => 'x.y.z').to_s.should == 'post:x.y.z$123'
40
- end
41
-
42
- it "replaces oid" do
43
- Pebbles::Uid.copy('post:a.b.c$123', :oid => 'xyz').to_s.should == 'post:a.b.c$xyz'
44
- end
45
- end
46
-
47
33
  describe "must" do
48
34
  specify "have a genus" do
49
35
  ->{ Pebbles::Uid.new(':tourism.norway$1') }.should raise_error(ArgumentError)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pebbles-uid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-10-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &70107839407440 !ruby/object:Gem::Requirement
16
+ requirement: &70147042121560 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70107839407440
24
+ version_requirements: *70147042121560
25
25
  description: Handle pebble UIDs conveniently.
26
26
  email:
27
27
  - katrina.owen@gmail.com