induction_cannon_01 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -3,9 +3,12 @@ source 'http://rubygems.org'
3
3
  gem 'rails', '3.0.5'
4
4
 
5
5
  gem 'mysql2'
6
+ gem 'jquery-rails', '>= 0.2.7'
7
+ gem 'inherited_resources'
8
+
6
9
  #gem 'dragoon_system', :git => "git@github.com:toward7seas01/dragoon_system.git"
7
10
  #gem 'dragoon_system', :path => '~/dragoon_system'
8
- gem 'dragoon_system', "0.1.3"
11
+ gem 'dragoon_system', "0.1.4"
9
12
 
10
13
 
11
14
  group :development do
@@ -19,10 +22,13 @@ group :development, :test do
19
22
  end
20
23
 
21
24
  group :test do
25
+ gem 'ffaker'
26
+ gem 'factory_girl_rails'
22
27
  gem 'cucumber-rails'
23
28
  gem 'database_cleaner', '~> 0.6.0'
24
29
  gem 'capybara', "~> 0.4.0"
25
30
  gem 'launchy'
31
+ gem 'rr'
26
32
  end
27
33
 
28
34
 
data/Gemfile.lock CHANGED
@@ -55,20 +55,33 @@ GEM
55
55
  culerity (0.2.12)
56
56
  database_cleaner (0.6.0)
57
57
  diff-lcs (1.1.2)
58
- dragoon_system (0.1.3)
58
+ dragoon_system (0.1.4)
59
+ mysql2
59
60
  rails (~> 3.0.5)
60
61
  erubis (2.6.6)
61
62
  abstract (>= 1.0.0)
63
+ factory_girl (1.3.3)
64
+ factory_girl_rails (1.0.1)
65
+ factory_girl (~> 1.3)
66
+ railties (>= 3.0.0)
67
+ ffaker (0.4.0)
62
68
  ffi (0.6.3)
63
69
  rake (>= 0.8.7)
64
70
  gherkin (2.3.3)
65
71
  json (~> 1.4.6)
66
72
  git (1.2.5)
73
+ has_scope (0.5.0)
67
74
  i18n (0.5.0)
75
+ inherited_resources (1.2.1)
76
+ has_scope (~> 0.5.0)
77
+ responders (~> 0.6.0)
68
78
  jeweler (1.5.2)
69
79
  bundler (~> 1.0.0)
70
80
  git (>= 1.2.5)
71
81
  rake
82
+ jquery-rails (0.2.7)
83
+ rails (~> 3.0)
84
+ thor (~> 0.14.4)
72
85
  json (1.4.6)
73
86
  json_pure (1.4.6)
74
87
  launchy (0.3.7)
@@ -103,6 +116,8 @@ GEM
103
116
  rake (>= 0.8.7)
104
117
  thor (~> 0.14.4)
105
118
  rake (0.8.7)
119
+ responders (0.6.2)
120
+ rr (1.0.2)
106
121
  rspec (2.5.0)
107
122
  rspec-core (~> 2.5.0)
108
123
  rspec-expectations (~> 2.5.0)
@@ -143,10 +158,15 @@ DEPENDENCIES
143
158
  capybara (~> 0.4.0)
144
159
  cucumber-rails
145
160
  database_cleaner (~> 0.6.0)
146
- dragoon_system (= 0.1.3)
161
+ dragoon_system (= 0.1.4)
162
+ factory_girl_rails
163
+ ffaker
164
+ inherited_resources
147
165
  jeweler (~> 1.5.1)
166
+ jquery-rails (>= 0.2.7)
148
167
  launchy
149
168
  mysql2
150
169
  rails (= 3.0.5)
170
+ rr
151
171
  rspec-rails (~> 2.5.0)
152
172
  ruby-debug
data/README.rdoc CHANGED
@@ -1,3 +1,5 @@
1
+ = rails generate dragoon_system:install, something will happen
2
+
1
3
  = induction_cannon_01
2
4
 
3
5
  Description goes here.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
@@ -1,83 +1,8 @@
1
1
  class UsersController < ApplicationController
2
- # GET /users
3
- # GET /users.xml
4
- def index
5
- @users = User.all
2
+ inherit_resources
6
3
 
7
- respond_to do |format|
8
- format.html # index.html.erb
9
- format.xml { render :xml => @users }
10
- end
4
+ def update_all
5
+ base_action {|record| record.update_attributes!(:name => :cool) }
11
6
  end
12
7
 
13
- # GET /users/1
14
- # GET /users/1.xml
15
- def show
16
- @user = User.find(params[:id])
17
-
18
- respond_to do |format|
19
- format.html # show.html.erb
20
- format.xml { render :xml => @user }
21
- end
22
- end
23
-
24
- # GET /users/new
25
- # GET /users/new.xml
26
- def new
27
- @user = User.new
28
-
29
- respond_to do |format|
30
- format.html # new.html.erb
31
- format.xml { render :xml => @user }
32
- end
33
- end
34
-
35
- # GET /users/1/edit
36
- def edit
37
- @user = User.find(params[:id])
38
- end
39
-
40
- # POST /users
41
- # POST /users.xml
42
- def create
43
- @user = User.new(params[:user])
44
-
45
- respond_to do |format|
46
- if @user.save
47
- format.html { redirect_to(@user, :notice => 'User was successfully created.') }
48
- format.xml { render :xml => @user, :status => :created, :location => @user }
49
- else
50
- format.html { render :action => "new" }
51
- format.xml { render :xml => @user.errors, :status => :unprocessable_entity }
52
- end
53
- end
54
- end
55
-
56
- # PUT /users/1
57
- # PUT /users/1.xml
58
- def update
59
- @user = User.find(params[:id])
60
-
61
- respond_to do |format|
62
- if @user.update_attributes(params[:user])
63
- format.html { redirect_to(@user, :notice => 'User was successfully updated.') }
64
- format.xml { head :ok }
65
- else
66
- format.html { render :action => "edit" }
67
- format.xml { render :xml => @user.errors, :status => :unprocessable_entity }
68
- end
69
- end
70
- end
71
-
72
- # DELETE /users/1
73
- # DELETE /users/1.xml
74
- def destroy
75
- @user = User.find(params[:id])
76
- @user.destroy
77
-
78
- respond_to do |format|
79
- format.html { redirect_to(users_url) }
80
- format.xml { head :ok }
81
- end
82
- end
83
8
  end
data/app/models/user.rb CHANGED
@@ -1,3 +1,4 @@
1
1
  class User < ActiveRecord::Base
2
2
  has_many :blogs
3
+
3
4
  end
data/config/routes.rb CHANGED
@@ -1,62 +1,16 @@
1
1
  InductionCannon01::Application.routes.draw do
2
2
  resources :blogs
3
3
 
4
- resources :users
5
-
6
- # The priority is based upon order of creation:
7
- # first created -> highest priority.
8
-
9
- # Sample of regular route:
10
- # match 'products/:id' => 'catalog#view'
11
- # Keep in mind you can assign values other than :controller and :action
12
-
13
- # Sample of named route:
14
- # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
15
- # This route can be invoked with purchase_url(:id => product.id)
16
-
17
- # Sample resource route (maps HTTP verbs to controller actions automatically):
18
- # resources :products
19
-
20
- # Sample resource route with options:
21
- # resources :products do
22
- # member do
23
- # get 'short'
24
- # post 'toggle'
25
- # end
26
- #
27
- # collection do
28
- # get 'sold'
29
- # end
30
- # end
31
-
32
- # Sample resource route with sub-resources:
33
- # resources :products do
34
- # resources :comments, :sales
35
- # resource :seller
36
- # end
37
-
38
- # Sample resource route with more complex sub-resources
39
- # resources :products do
40
- # resources :comments
41
- # resources :sales do
42
- # get 'recent', :on => :collection
43
- # end
44
- # end
45
-
46
- # Sample resource route within a namespace:
47
- # namespace :admin do
48
- # # Directs /admin/products/* to Admin::ProductsController
49
- # # (app/controllers/admin/products_controller.rb)
50
- # resources :products
51
- # end
52
-
53
- # You can have the root of your site routed with "root"
54
- # just remember to delete public/index.html.
55
- # root :to => "welcome#index"
56
-
57
- # See how all your routes lay out with "rake routes"
58
-
59
- # This is a legacy wild controller route that's not recommended for RESTful applications.
60
- # Note: This route will make all actions in every controller accessible via GET requests.
61
- # match ':controller(/:action(/:id(.:format)))'
4
+ resources :users do
5
+ collection do
6
+ put :update_all
7
+ end
8
+ end
9
+
10
+
11
+
12
+
13
+
14
+
15
+
62
16
  end
@@ -5,16 +5,15 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{induction_cannon_01}
8
- s.version = "0.0.2"
8
+ s.version = "0.0.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["zhanyinan"]
12
- s.date = %q{2011-03-02}
12
+ s.date = %q{2011-03-04}
13
13
  s.description = %q{personal suit, base on dragoon_system}
14
14
  s.email = %q{toward7seas@gmail.com}
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE.txt",
17
- "README",
18
17
  "README.rdoc"
19
18
  ]
20
19
  s.files = [
@@ -23,7 +22,6 @@ Gem::Specification.new do |s|
23
22
  "Gemfile",
24
23
  "Gemfile.lock",
25
24
  "LICENSE.txt",
26
- "README",
27
25
  "README.rdoc",
28
26
  "Rakefile",
29
27
  "VERSION",
@@ -70,7 +68,9 @@ Gem::Specification.new do |s|
70
68
  "induction_cannon_01.gemspec",
71
69
  "lib/induction_cannon_01.rb",
72
70
  "lib/tasks/.gitkeep",
71
+ "lib/tasks/custom.rake",
73
72
  "pkg/induction_cannon_01-0.0.1.gem",
73
+ "pkg/induction_cannon_01-0.0.2.gem",
74
74
  "public/404.html",
75
75
  "public/422.html",
76
76
  "public/500.html",
@@ -78,15 +78,17 @@ Gem::Specification.new do |s|
78
78
  "public/images/rails.png",
79
79
  "public/index.html",
80
80
  "public/javascripts/application.js",
81
- "public/javascripts/controls.js",
82
- "public/javascripts/dragdrop.js",
83
- "public/javascripts/effects.js",
84
- "public/javascripts/prototype.js",
81
+ "public/javascripts/jquery.js",
82
+ "public/javascripts/jquery.min.js",
85
83
  "public/javascripts/rails.js",
86
84
  "public/robots.txt",
87
85
  "public/stylesheets/.gitkeep",
88
86
  "public/stylesheets/scaffold.css",
89
87
  "script/rails",
88
+ "spec/controllers/users_controller_spec.rb",
89
+ "spec/factories/user.rb",
90
+ "spec/models/base/search_spec.rb",
91
+ "spec/models/base/transaction_spec.rb",
90
92
  "spec/models/extra_spec.rb",
91
93
  "spec/models/user_spec.rb",
92
94
  "spec/spec_helper.rb",
@@ -98,6 +100,10 @@ Gem::Specification.new do |s|
98
100
  s.rubygems_version = %q{1.5.2}
99
101
  s.summary = %q{personal suit, base on dragoon_system}
100
102
  s.test_files = [
103
+ "spec/controllers/users_controller_spec.rb",
104
+ "spec/factories/user.rb",
105
+ "spec/models/base/search_spec.rb",
106
+ "spec/models/base/transaction_spec.rb",
101
107
  "spec/models/extra_spec.rb",
102
108
  "spec/models/user_spec.rb",
103
109
  "spec/spec_helper.rb"
@@ -109,7 +115,9 @@ Gem::Specification.new do |s|
109
115
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
110
116
  s.add_runtime_dependency(%q<rails>, ["= 3.0.5"])
111
117
  s.add_runtime_dependency(%q<mysql2>, [">= 0"])
112
- s.add_runtime_dependency(%q<dragoon_system>, ["= 0.1.3"])
118
+ s.add_runtime_dependency(%q<jquery-rails>, [">= 0.2.7"])
119
+ s.add_runtime_dependency(%q<inherited_resources>, [">= 0"])
120
+ s.add_runtime_dependency(%q<dragoon_system>, ["= 0.1.4"])
113
121
  s.add_development_dependency(%q<bundler>, ["~> 1.0.10"])
114
122
  s.add_development_dependency(%q<jeweler>, ["~> 1.5.1"])
115
123
  s.add_development_dependency(%q<rspec-rails>, ["~> 2.5.0"])
@@ -117,7 +125,9 @@ Gem::Specification.new do |s|
117
125
  else
118
126
  s.add_dependency(%q<rails>, ["= 3.0.5"])
119
127
  s.add_dependency(%q<mysql2>, [">= 0"])
120
- s.add_dependency(%q<dragoon_system>, ["= 0.1.3"])
128
+ s.add_dependency(%q<jquery-rails>, [">= 0.2.7"])
129
+ s.add_dependency(%q<inherited_resources>, [">= 0"])
130
+ s.add_dependency(%q<dragoon_system>, ["= 0.1.4"])
121
131
  s.add_dependency(%q<bundler>, ["~> 1.0.10"])
122
132
  s.add_dependency(%q<jeweler>, ["~> 1.5.1"])
123
133
  s.add_dependency(%q<rspec-rails>, ["~> 2.5.0"])
@@ -126,7 +136,9 @@ Gem::Specification.new do |s|
126
136
  else
127
137
  s.add_dependency(%q<rails>, ["= 3.0.5"])
128
138
  s.add_dependency(%q<mysql2>, [">= 0"])
129
- s.add_dependency(%q<dragoon_system>, ["= 0.1.3"])
139
+ s.add_dependency(%q<jquery-rails>, [">= 0.2.7"])
140
+ s.add_dependency(%q<inherited_resources>, [">= 0"])
141
+ s.add_dependency(%q<dragoon_system>, ["= 0.1.4"])
130
142
  s.add_dependency(%q<bundler>, ["~> 1.0.10"])
131
143
  s.add_dependency(%q<jeweler>, ["~> 1.5.1"])
132
144
  s.add_dependency(%q<rspec-rails>, ["~> 2.5.0"])
@@ -0,0 +1,7 @@
1
+ task :gs1 do
2
+ system("git instaweb --httpd=webrick --port=8626")
3
+ end
4
+
5
+ task :gs2 do
6
+ system("git instaweb --httpd=webrick --stop")
7
+ end
Binary file