frill 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/frill/frill.rb +1 -18
  3. data/spec/frill_spec.rb +1 -9
  4. metadata +11 -11
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.5
1
+ 0.1.6
data/lib/frill/frill.rb CHANGED
@@ -32,7 +32,7 @@ module Frill
32
32
  end
33
33
 
34
34
  def after decorator
35
- Frill.list.move_after self, decorator
35
+ Frill.list.move_before decorator, self
36
36
  end
37
37
  end
38
38
 
@@ -54,15 +54,6 @@ module Frill
54
54
  detect_cycles
55
55
  end
56
56
 
57
- def move_after label1, label2
58
- node1 = add label1
59
- node2 = add label2
60
-
61
- node1.move_after node2
62
-
63
- detect_cycles
64
- end
65
-
66
57
  def [](label)
67
58
  @nodes[label]
68
59
  end
@@ -133,14 +124,6 @@ module Frill
133
124
  next_node.previous = previous_node
134
125
  end
135
126
 
136
- def move_after node
137
- previous_node = node.last
138
- first_node = first
139
-
140
- previous_node.next = first_node
141
- first_node.previous = previous_node
142
- end
143
-
144
127
  def first
145
128
  node = nil
146
129
  current_node = self
data/spec/frill_spec.rb CHANGED
@@ -130,17 +130,9 @@ describe Frill do
130
130
  g = Frill::List.new
131
131
  g.move_before "a", "b"
132
132
  g.move_before "c", "d"
133
- g.move_after "b", "c"
133
+ g.move_before "c", "b"
134
134
  g.to_a.should == ["c", "d", "a", "b"]
135
135
  end
136
- end
137
-
138
- describe "#move_after(label1, label2)" do
139
- it "should move label1 after label2" do
140
- g = Frill::List.new
141
- g.move_after "a", "b"
142
- g.to_a.should == ["b", "a"]
143
- end
144
136
 
145
137
  it "should throw exceptions when cycles are detected" do
146
138
  g = Frill::List.new
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: frill
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-08-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &70245083877380 !ruby/object:Gem::Requirement
16
+ requirement: &70187789338700 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.2.2
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70245083877380
24
+ version_requirements: *70187789338700
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rspec
27
- requirement: &70245083876800 !ruby/object:Gem::Requirement
27
+ requirement: &70187789338120 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70245083876800
35
+ version_requirements: *70187789338120
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec-rails
38
- requirement: &70245083875880 !ruby/object:Gem::Requirement
38
+ requirement: &70187789337420 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70245083875880
46
+ version_requirements: *70187789337420
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: capybara
49
- requirement: &70245083875240 !ruby/object:Gem::Requirement
49
+ requirement: &70187789336740 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70245083875240
57
+ version_requirements: *70187789336740
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: pry
60
- requirement: &70245083874700 !ruby/object:Gem::Requirement
60
+ requirement: &70187789336200 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70245083874700
68
+ version_requirements: *70187789336200
69
69
  description:
70
70
  email: moonmaster9000@gmail.com
71
71
  executables: []