stateful_link 0.0.2 → 0.0.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/.gitignore ADDED
@@ -0,0 +1,6 @@
1
+ .bundle/
2
+ log/*.log
3
+ pkg/
4
+ spec/dummy/db/*.sqlite3
5
+ spec/dummy/log/*.log
6
+ spec/dummy/tmp/
data/Gemfile CHANGED
@@ -1,14 +1,3 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- gem "rails", ">= 3"
4
- gem "capybara", ">= 0.3.9"
5
- gem "sqlite3-ruby", :require => "sqlite3"
6
-
7
- group :development, :test do
8
- gem 'childprocess'
9
- if RUBY_VERSION < '1.9'
10
- gem "ruby-debug", ">= 0.10.3"
11
- end
12
- end
13
-
14
- gem "rspec-rails", ">= 2.0.0.beta"
3
+ gemspec
data/Gemfile.lock CHANGED
@@ -1,37 +1,42 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ stateful_link (0.0.3)
5
+ rails (>= 3)
6
+
1
7
  GEM
2
8
  remote: http://rubygems.org/
3
9
  specs:
4
10
  abstract (1.0.0)
5
- actionmailer (3.0.1)
6
- actionpack (= 3.0.1)
7
- mail (~> 2.2.5)
8
- actionpack (3.0.1)
9
- activemodel (= 3.0.1)
10
- activesupport (= 3.0.1)
11
+ actionmailer (3.0.5)
12
+ actionpack (= 3.0.5)
13
+ mail (~> 2.2.15)
14
+ actionpack (3.0.5)
15
+ activemodel (= 3.0.5)
16
+ activesupport (= 3.0.5)
11
17
  builder (~> 2.1.2)
12
18
  erubis (~> 2.6.6)
13
- i18n (~> 0.4.1)
19
+ i18n (~> 0.4)
14
20
  rack (~> 1.2.1)
15
- rack-mount (~> 0.6.12)
16
- rack-test (~> 0.5.4)
21
+ rack-mount (~> 0.6.13)
22
+ rack-test (~> 0.5.7)
17
23
  tzinfo (~> 0.3.23)
18
- activemodel (3.0.1)
19
- activesupport (= 3.0.1)
24
+ activemodel (3.0.5)
25
+ activesupport (= 3.0.5)
20
26
  builder (~> 2.1.2)
21
- i18n (~> 0.4.1)
22
- activerecord (3.0.1)
23
- activemodel (= 3.0.1)
24
- activesupport (= 3.0.1)
25
- arel (~> 1.0.0)
27
+ i18n (~> 0.4)
28
+ activerecord (3.0.5)
29
+ activemodel (= 3.0.5)
30
+ activesupport (= 3.0.5)
31
+ arel (~> 2.0.2)
26
32
  tzinfo (~> 0.3.23)
27
- activeresource (3.0.1)
28
- activemodel (= 3.0.1)
29
- activesupport (= 3.0.1)
30
- activesupport (3.0.1)
31
- arel (1.0.1)
32
- activesupport (~> 3.0.0)
33
+ activeresource (3.0.5)
34
+ activemodel (= 3.0.5)
35
+ activesupport (= 3.0.5)
36
+ activesupport (3.0.5)
37
+ arel (2.0.9)
33
38
  builder (2.1.2)
34
- capybara (0.4.0)
39
+ capybara (0.4.1.2)
35
40
  celerity (>= 0.7.9)
36
41
  culerity (>= 0.2.4)
37
42
  mime-types (>= 1.16)
@@ -39,83 +44,79 @@ GEM
39
44
  rack (>= 1.0.0)
40
45
  rack-test (>= 0.5.4)
41
46
  selenium-webdriver (>= 0.0.27)
42
- xpath (~> 0.1.2)
43
- celerity (0.8.2)
44
- childprocess (0.1.4)
47
+ xpath (~> 0.1.3)
48
+ celerity (0.8.8)
49
+ childprocess (0.1.7)
45
50
  ffi (~> 0.6.3)
46
- columnize (0.3.2)
47
- culerity (0.2.12)
51
+ culerity (0.2.15)
48
52
  diff-lcs (1.1.2)
49
53
  erubis (2.6.6)
50
54
  abstract (>= 1.0.0)
51
55
  ffi (0.6.3)
52
56
  rake (>= 0.8.7)
53
- i18n (0.4.2)
54
- json_pure (1.4.6)
55
- linecache (0.43)
56
- mail (2.2.9)
57
+ i18n (0.5.0)
58
+ json_pure (1.5.1)
59
+ mail (2.2.15)
57
60
  activesupport (>= 2.3.6)
58
- i18n (~> 0.4.1)
61
+ i18n (>= 0.4.0)
59
62
  mime-types (~> 1.16)
60
63
  treetop (~> 1.4.8)
61
64
  mime-types (1.16)
62
- nokogiri (1.4.3.1)
65
+ nokogiri (1.4.4)
63
66
  polyglot (0.3.1)
64
- rack (1.2.1)
67
+ rack (1.2.2)
65
68
  rack-mount (0.6.13)
66
69
  rack (>= 1.0.0)
67
- rack-test (0.5.6)
70
+ rack-test (0.5.7)
68
71
  rack (>= 1.0)
69
- rails (3.0.1)
70
- actionmailer (= 3.0.1)
71
- actionpack (= 3.0.1)
72
- activerecord (= 3.0.1)
73
- activeresource (= 3.0.1)
74
- activesupport (= 3.0.1)
75
- bundler (~> 1.0.0)
76
- railties (= 3.0.1)
77
- railties (3.0.1)
78
- actionpack (= 3.0.1)
79
- activesupport (= 3.0.1)
80
- rake (>= 0.8.4)
81
- thor (~> 0.14.0)
72
+ rails (3.0.5)
73
+ actionmailer (= 3.0.5)
74
+ actionpack (= 3.0.5)
75
+ activerecord (= 3.0.5)
76
+ activeresource (= 3.0.5)
77
+ activesupport (= 3.0.5)
78
+ bundler (~> 1.0)
79
+ railties (= 3.0.5)
80
+ railties (3.0.5)
81
+ actionpack (= 3.0.5)
82
+ activesupport (= 3.0.5)
83
+ rake (>= 0.8.7)
84
+ thor (~> 0.14.4)
82
85
  rake (0.8.7)
83
- rspec (2.1.0)
84
- rspec-core (~> 2.1.0)
85
- rspec-expectations (~> 2.1.0)
86
- rspec-mocks (~> 2.1.0)
87
- rspec-core (2.1.0)
88
- rspec-expectations (2.1.0)
86
+ rspec (2.5.0)
87
+ rspec-core (~> 2.5.0)
88
+ rspec-expectations (~> 2.5.0)
89
+ rspec-mocks (~> 2.5.0)
90
+ rspec-core (2.5.1)
91
+ rspec-expectations (2.5.0)
89
92
  diff-lcs (~> 1.1.2)
90
- rspec-mocks (2.1.0)
91
- rspec-rails (2.1.0)
92
- rspec (~> 2.1.0)
93
- ruby-debug (0.10.4)
94
- columnize (>= 0.1)
95
- ruby-debug-base (~> 0.10.4.0)
96
- ruby-debug-base (0.10.4)
97
- linecache (>= 0.3)
93
+ rspec-mocks (2.5.0)
94
+ rspec-rails (2.5.0)
95
+ actionpack (~> 3.0)
96
+ activesupport (~> 3.0)
97
+ railties (~> 3.0)
98
+ rspec (~> 2.5.0)
98
99
  rubyzip (0.9.4)
99
- selenium-webdriver (0.1.0)
100
- childprocess (= 0.1.4)
100
+ selenium-webdriver (0.1.3)
101
+ childprocess (~> 0.1.5)
101
102
  ffi (~> 0.6.3)
102
103
  json_pure
103
104
  rubyzip
104
- sqlite3-ruby (1.3.2)
105
- thor (0.14.4)
106
- treetop (1.4.8)
105
+ sqlite3 (1.3.3)
106
+ sqlite3-ruby (1.3.3)
107
+ sqlite3 (>= 1.3.3)
108
+ thor (0.14.6)
109
+ treetop (1.4.9)
107
110
  polyglot (>= 0.3.1)
108
- tzinfo (0.3.23)
109
- xpath (0.1.2)
111
+ tzinfo (0.3.25)
112
+ xpath (0.1.3)
110
113
  nokogiri (~> 1.3)
111
114
 
112
115
  PLATFORMS
113
116
  ruby
114
117
 
115
118
  DEPENDENCIES
116
- capybara (>= 0.3.9)
117
- childprocess
118
- rails (>= 3)
119
- rspec-rails (>= 2.0.0.beta)
120
- ruby-debug (>= 0.10.3)
119
+ capybara
120
+ rspec-rails (~> 2.4)
121
121
  sqlite3-ruby
122
+ stateful_link!
data/README.rdoc CHANGED
@@ -39,7 +39,7 @@ Solution:
39
39
 
40
40
  module ApplicationHelper
41
41
  def navigation_link(label, active, chosen, url)
42
- stateful_link(
42
+ stateful_link_to(
43
43
  active,
44
44
  chosen,
45
45
  :active => proc { label },
data/Rakefile CHANGED
@@ -1,27 +1,10 @@
1
- # encoding: UTF-8
1
+ require 'bundler'
2
2
  require 'rake'
3
+ require 'rake/testtask'
3
4
  require 'rspec/core'
4
5
  require 'rspec/core/rake_task'
5
6
 
6
- RSpec::Core::RakeTask.new(:spec)
7
- task :default => :spec
7
+ Bundler::GemHelper.install_tasks
8
8
 
9
- begin
10
- require "jeweler"
11
- Jeweler::Tasks.new do |gem|
12
- gem.name = "stateful_link"
13
- gem.summary = "Helper to generate stateful navigation links."
14
- gem.description = "Helper to generate stateful navigation links."
15
- gem.files = FileList["[A-Z]*", "lib/**/*"]
16
- gem.version = "0.0.2"
17
- gem.email = "gzigzigzeo@gmail.com"
18
- gem.authors = ["Victor Sokolov"]
19
- gem.homepage = "http://github.com/gzigzigzeo/stateful_link"
20
-
21
- gem.add_dependency "rails", ">= 3.0.0"
22
- end
23
-
24
- Jeweler::GemcutterTasks.new
25
- rescue LoadError
26
- puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
27
- end
9
+ RSpec::Core::RakeTask.new(:spec)
10
+ task :default => :spec
@@ -0,0 +1,3 @@
1
+ module StatefulLink
2
+ VERSION = '0.0.3'
3
+ end
@@ -0,0 +1,7 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require File.expand_path('../config/application', __FILE__)
5
+ require 'rake'
6
+
7
+ Dummy::Application.load_tasks
File without changes
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Dummy</title>
5
+ <%= stylesheet_link_tag :all %>
6
+ <%= javascript_include_tag :defaults %>
7
+ <%= csrf_meta_tag %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -0,0 +1,22 @@
1
+ # SQLite version 3.x
2
+ # gem install sqlite3-ruby (not necessary on OS X Leopard)
3
+ development:
4
+ adapter: sqlite3
5
+ database: ":memory:"
6
+ pool: 5
7
+ timeout: 5000
8
+
9
+ # Warning: The database defined as "test" will be erased and
10
+ # re-generated from your development database when you run "rake".
11
+ # Do not set this db to the same as development or production.
12
+ test:
13
+ adapter: sqlite3
14
+ database: ":memory:"
15
+ pool: 5
16
+ timeout: 5000
17
+
18
+ production:
19
+ adapter: sqlite3
20
+ database: ":memory:"
21
+ pool: 5
22
+ timeout: 5000
@@ -0,0 +1,5 @@
1
+ # Sample localization file for English. Add more files in this directory for other locales.
2
+ # See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
+
4
+ en:
5
+ hello: "Hello world"
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Dummy::Application
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/404.html -->
21
+ <div class="dialog">
22
+ <h1>The page you were looking for doesn't exist.</h1>
23
+ <p>You may have mistyped the address or the page may have moved.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/422.html -->
21
+ <div class="dialog">
22
+ <h1>The change you wanted was rejected.</h1>
23
+ <p>Maybe you tried to change something you didn't have access to.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/500.html -->
21
+ <div class="dialog">
22
+ <h1>We're sorry, but something went wrong.</h1>
23
+ <p>We've been notified about this issue and we'll take a look at it shortly.</p>
24
+ </div>
25
+ </body>
26
+ </html>
File without changes
@@ -0,0 +1,2 @@
1
+ // Place your application-specific JavaScript functions and classes here
2
+ // This file is automatically included by javascript_include_tag :defaults