wiserespond 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.2
4
+ - 1.9.3
data/Gemfile CHANGED
@@ -3,7 +3,7 @@ source "http://rubygems.org"
3
3
  gem 'rails', '>=3.0.0'
4
4
 
5
5
  group :development, :test do
6
- gem 'sqlite3-ruby'
6
+ gem 'sqlite3'
7
7
  gem "shoulda", ">= 0"
8
8
  gem "bundler", "~> 1.0.0"
9
9
  gem "jeweler", "~> 1.6.4"
@@ -1,31 +1,31 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- actionmailer (3.2.2)
5
- actionpack (= 3.2.2)
6
- mail (~> 2.4.0)
7
- actionpack (3.2.2)
8
- activemodel (= 3.2.2)
9
- activesupport (= 3.2.2)
4
+ actionmailer (3.2.3)
5
+ actionpack (= 3.2.3)
6
+ mail (~> 2.4.4)
7
+ actionpack (3.2.3)
8
+ activemodel (= 3.2.3)
9
+ activesupport (= 3.2.3)
10
10
  builder (~> 3.0.0)
11
11
  erubis (~> 2.7.0)
12
12
  journey (~> 1.0.1)
13
13
  rack (~> 1.4.0)
14
- rack-cache (~> 1.1)
14
+ rack-cache (~> 1.2)
15
15
  rack-test (~> 0.6.1)
16
16
  sprockets (~> 2.1.2)
17
- activemodel (3.2.2)
18
- activesupport (= 3.2.2)
17
+ activemodel (3.2.3)
18
+ activesupport (= 3.2.3)
19
19
  builder (~> 3.0.0)
20
- activerecord (3.2.2)
21
- activemodel (= 3.2.2)
22
- activesupport (= 3.2.2)
20
+ activerecord (3.2.3)
21
+ activemodel (= 3.2.3)
22
+ activesupport (= 3.2.3)
23
23
  arel (~> 3.0.2)
24
24
  tzinfo (~> 0.3.29)
25
- activeresource (3.2.2)
26
- activemodel (= 3.2.2)
27
- activesupport (= 3.2.2)
28
- activesupport (3.2.2)
25
+ activeresource (3.2.3)
26
+ activemodel (= 3.2.3)
27
+ activesupport (= 3.2.3)
28
+ activesupport (3.2.3)
29
29
  i18n (~> 0.6)
30
30
  multi_json (~> 1.0)
31
31
  arel (3.0.2)
@@ -39,13 +39,13 @@ GEM
39
39
  git (>= 1.2.5)
40
40
  rake
41
41
  journey (1.0.3)
42
- json (1.6.5)
42
+ json (1.6.6)
43
43
  mail (2.4.4)
44
44
  i18n (>= 0.4.0)
45
45
  mime-types (~> 1.16)
46
46
  treetop (~> 1.4.8)
47
- mime-types (1.17.2)
48
- multi_json (1.1.0)
47
+ mime-types (1.18)
48
+ multi_json (1.3.2)
49
49
  polyglot (0.3.3)
50
50
  rack (1.4.1)
51
51
  rack-cache (1.2)
@@ -54,17 +54,17 @@ GEM
54
54
  rack
55
55
  rack-test (0.6.1)
56
56
  rack (>= 1.0)
57
- rails (3.2.2)
58
- actionmailer (= 3.2.2)
59
- actionpack (= 3.2.2)
60
- activerecord (= 3.2.2)
61
- activeresource (= 3.2.2)
62
- activesupport (= 3.2.2)
57
+ rails (3.2.3)
58
+ actionmailer (= 3.2.3)
59
+ actionpack (= 3.2.3)
60
+ activerecord (= 3.2.3)
61
+ activeresource (= 3.2.3)
62
+ activesupport (= 3.2.3)
63
63
  bundler (~> 1.0)
64
- railties (= 3.2.2)
65
- railties (3.2.2)
66
- actionpack (= 3.2.2)
67
- activesupport (= 3.2.2)
64
+ railties (= 3.2.3)
65
+ railties (3.2.3)
66
+ actionpack (= 3.2.3)
67
+ activesupport (= 3.2.3)
68
68
  rack-ssl (~> 1.3.2)
69
69
  rake (>= 0.8.7)
70
70
  rdoc (~> 3.4)
@@ -81,15 +81,13 @@ GEM
81
81
  hike (~> 1.2)
82
82
  rack (~> 1.0)
83
83
  tilt (~> 1.1, != 1.3.0)
84
- sqlite3 (1.3.5)
85
- sqlite3-ruby (1.3.3)
86
- sqlite3 (>= 1.3.3)
84
+ sqlite3 (1.3.6)
87
85
  thor (0.14.6)
88
86
  tilt (1.3.3)
89
87
  treetop (1.4.10)
90
88
  polyglot
91
89
  polyglot (>= 0.3.1)
92
- tzinfo (0.3.32)
90
+ tzinfo (0.3.33)
93
91
 
94
92
  PLATFORMS
95
93
  ruby
@@ -99,4 +97,4 @@ DEPENDENCIES
99
97
  jeweler (~> 1.6.4)
100
98
  rails (>= 3.0.0)
101
99
  shoulda
102
- sqlite3-ruby
100
+ sqlite3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.0.1
@@ -8,7 +8,7 @@ module Wiserespond
8
8
  :status => :success
9
9
  )
10
10
 
11
- self.wiserespond_setup_flash(options)
11
+ self.setup_flash_for_redirect(options)
12
12
 
13
13
  respond_to do |format|
14
14
  format.html { redirect_to options[:url] }
@@ -23,7 +23,7 @@ module Wiserespond
23
23
  :locals => nil
24
24
  )
25
25
 
26
- self.wiserespond_setup_flash(options)
26
+ self.setup_flash_for_content(options)
27
27
 
28
28
  respond_to do |format|
29
29
  format.html { render options[:action] }
@@ -31,16 +31,16 @@ module Wiserespond
31
31
  end
32
32
  end
33
33
 
34
- def wiserespond_setup_flash(options)
35
- if options[:flash].present?
36
- case options[:status]
37
- when :success
38
- flash[:notice] = options[:flash]
39
- else
40
- flash[:warning] = options[:flash]
41
- end
42
- end
34
+ def setup_flash_for_redirect(options)
35
+ message = options.delete(:flash)
36
+ flash[options[:status]] = message if message.present?
43
37
  end
44
- protected :wiserespond_setup_flash
38
+ protected :setup_flash_for_redirect
39
+
40
+ def setup_flash_for_content(options)
41
+ message = options.delete(:flash)
42
+ options[:flash] = { options[:status] => message } if message.present?
43
+ end
44
+ protected :setup_flash_for_content
45
45
  end
46
46
  end
@@ -1,6 +1,6 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
3
+ Dummy::Application.config.session_store :cookie_store, :key => '_dummy_session'
4
4
 
5
5
  # Use the database for sessions instead of the cookie-based default,
6
6
  # which shouldn't be used to store highly confidential information
@@ -5,7 +5,7 @@
5
5
 
6
6
  # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
7
  ActiveSupport.on_load(:action_controller) do
8
- wrap_parameters format: [:json]
8
+ wrap_parameters :format => [:json]
9
9
  end
10
10
 
11
11
  # Disable root element in JSON by default.
@@ -1,58 +1,2 @@
1
1
  Dummy::Application.routes.draw do
2
- # The priority is based upon order of creation:
3
- # first created -> highest priority.
4
-
5
- # Sample of regular route:
6
- # match 'products/:id' => 'catalog#view'
7
- # Keep in mind you can assign values other than :controller and :action
8
-
9
- # Sample of named route:
10
- # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
11
- # This route can be invoked with purchase_url(:id => product.id)
12
-
13
- # Sample resource route (maps HTTP verbs to controller actions automatically):
14
- # resources :products
15
-
16
- # Sample resource route with options:
17
- # resources :products do
18
- # member do
19
- # get 'short'
20
- # post 'toggle'
21
- # end
22
- #
23
- # collection do
24
- # get 'sold'
25
- # end
26
- # end
27
-
28
- # Sample resource route with sub-resources:
29
- # resources :products do
30
- # resources :comments, :sales
31
- # resource :seller
32
- # end
33
-
34
- # Sample resource route with more complex sub-resources
35
- # resources :products do
36
- # resources :comments
37
- # resources :sales do
38
- # get 'recent', :on => :collection
39
- # end
40
- # end
41
-
42
- # Sample resource route within a namespace:
43
- # namespace :admin do
44
- # # Directs /admin/products/* to Admin::ProductsController
45
- # # (app/controllers/admin/products_controller.rb)
46
- # resources :products
47
- # end
48
-
49
- # You can have the root of your site routed with "root"
50
- # just remember to delete public/index.html.
51
- # root :to => 'welcome#index'
52
-
53
- # See how all your routes lay out with "rake routes"
54
-
55
- # This is a legacy wild controller route that's not recommended for RESTful applications.
56
- # Note: This route will make all actions in every controller accessible via GET requests.
57
- # match ':controller(/:action(/:id))(.:format)'
58
2
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "wiserespond"
8
- s.version = "1.0.0"
8
+ s.version = "1.0.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Igor Alexandrov"]
12
- s.date = "2012-03-18"
12
+ s.date = "2012-04-20"
13
13
  s.description = "With wiserespond you can easily setup your controllers to respond to :html and :js content types."
14
14
  s.email = "igor.alexandrov@gmail.com"
15
15
  s.extra_rdoc_files = [
@@ -18,6 +18,7 @@ Gem::Specification.new do |s|
18
18
  ]
19
19
  s.files = [
20
20
  ".document",
21
+ ".travis.yml",
21
22
  "Gemfile",
22
23
  "Gemfile.lock",
23
24
  "LICENSE.txt",
@@ -58,7 +59,6 @@ Gem::Specification.new do |s|
58
59
  "test/dummy/config/routes.rb",
59
60
  "test/dummy/lib/assets/.gitkeep",
60
61
  "test/dummy/log/.gitkeep",
61
- "test/dummy/log/test.log",
62
62
  "test/dummy/public/404.html",
63
63
  "test/dummy/public/422.html",
64
64
  "test/dummy/public/500.html",
@@ -78,20 +78,20 @@ Gem::Specification.new do |s|
78
78
 
79
79
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
80
80
  s.add_runtime_dependency(%q<rails>, [">= 3.0.0"])
81
- s.add_development_dependency(%q<sqlite3-ruby>, [">= 0"])
81
+ s.add_development_dependency(%q<sqlite3>, [">= 0"])
82
82
  s.add_development_dependency(%q<shoulda>, [">= 0"])
83
83
  s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
84
84
  s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
85
85
  else
86
86
  s.add_dependency(%q<rails>, [">= 3.0.0"])
87
- s.add_dependency(%q<sqlite3-ruby>, [">= 0"])
87
+ s.add_dependency(%q<sqlite3>, [">= 0"])
88
88
  s.add_dependency(%q<shoulda>, [">= 0"])
89
89
  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
90
90
  s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
91
91
  end
92
92
  else
93
93
  s.add_dependency(%q<rails>, [">= 3.0.0"])
94
- s.add_dependency(%q<sqlite3-ruby>, [">= 0"])
94
+ s.add_dependency(%q<sqlite3>, [">= 0"])
95
95
  s.add_dependency(%q<shoulda>, [">= 0"])
96
96
  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
97
97
  s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wiserespond
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-18 00:00:00.000000000 Z
12
+ date: 2012-04-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &70229577898120 !ruby/object:Gem::Requirement
16
+ requirement: &70160683884820 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.0.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70229577898120
24
+ version_requirements: *70160683884820
25
25
  - !ruby/object:Gem::Dependency
26
- name: sqlite3-ruby
27
- requirement: &70229577893960 !ruby/object:Gem::Requirement
26
+ name: sqlite3
27
+ requirement: &70160683881980 !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: *70229577893960
35
+ version_requirements: *70160683881980
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: shoulda
38
- requirement: &70229577909700 !ruby/object:Gem::Requirement
38
+ requirement: &70160683879940 !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: *70229577909700
46
+ version_requirements: *70160683879940
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bundler
49
- requirement: &70229577904720 !ruby/object:Gem::Requirement
49
+ requirement: &70160683894240 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 1.0.0
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70229577904720
57
+ version_requirements: *70160683894240
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: jeweler
60
- requirement: &70229577917960 !ruby/object:Gem::Requirement
60
+ requirement: &70160683892940 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: 1.6.4
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70229577917960
68
+ version_requirements: *70160683892940
69
69
  description: With wiserespond you can easily setup your controllers to respond to
70
70
  :html and :js content types.
71
71
  email: igor.alexandrov@gmail.com
@@ -76,6 +76,7 @@ extra_rdoc_files:
76
76
  - README.md
77
77
  files:
78
78
  - .document
79
+ - .travis.yml
79
80
  - Gemfile
80
81
  - Gemfile.lock
81
82
  - LICENSE.txt
@@ -116,7 +117,6 @@ files:
116
117
  - test/dummy/config/routes.rb
117
118
  - test/dummy/lib/assets/.gitkeep
118
119
  - test/dummy/log/.gitkeep
119
- - test/dummy/log/test.log
120
120
  - test/dummy/public/404.html
121
121
  - test/dummy/public/422.html
122
122
  - test/dummy/public/500.html
@@ -139,7 +139,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
139
139
  version: '0'
140
140
  segments:
141
141
  - 0
142
- hash: -3895462990281156701
142
+ hash: 1542820635880732470
143
143
  required_rubygems_version: !ruby/object:Gem::Requirement
144
144
  none: false
145
145
  requirements:
@@ -1,16 +0,0 @@
1
-  (0.2ms) begin transaction
2
-  (0.1ms) rollback transaction
3
-  (0.2ms) begin transaction
4
-  (0.1ms) rollback transaction
5
-  (0.2ms) begin transaction
6
-  (0.1ms) rollback transaction
7
-  (0.2ms) begin transaction
8
-  (0.0ms) rollback transaction
9
-  (0.2ms) begin transaction
10
-  (0.0ms) rollback transaction
11
-  (0.0ms) begin transaction
12
-  (0.0ms) rollback transaction
13
-  (0.2ms) begin transaction
14
-  (0.2ms) rollback transaction
15
-  (0.1ms) begin transaction
16
-  (0.1ms) rollback transaction