erp_dev_svcs 3.0.3 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -28,7 +28,7 @@ when 'uninstall_gems'
28
28
  ErpDevSvcs::Commands::UninstallGems.execute
29
29
  else
30
30
  puts <<-EOT
31
- Usage: compass-util COMMAND [ARGS]
31
+ Usage: compass_ae-dev COMMAND [ARGS]
32
32
 
33
33
  This app contains utility programs for Compass developers:
34
34
 
@@ -14,7 +14,7 @@ module ErpDevSvcs
14
14
  :gems => nil}
15
15
 
16
16
  opt_parser = OptionParser.new do |opt|
17
- opt.banner = "Usage: compass-util build_gems [OPTIONS]"
17
+ opt.banner = "Usage: compass_ae-dev build_gems [OPTIONS]"
18
18
 
19
19
  opt.on("-g", "--gems [GEMLIST]", Array,
20
20
  "List of gems to build; defaults to all") {|gem| options[:gems] = gem}
@@ -15,8 +15,10 @@ module ErpDevSvcs
15
15
  gem_names = ErpDevSvcs::Commands::Helper.compass_gem_names
16
16
 
17
17
  opt_parser = OptionParser.new do |opt|
18
- opt.banner = "Usage: compass-util new_gem_owner --emails LISTOFEMAILS"
18
+ opt.banner = "Usage: compass_ae-dev new_gem_owner --emails LISTOFEMAILS"
19
19
 
20
+ opt.on('-r', '--remove', String, "remove user from gem owner"){|r| options[:remove] = "-r"}
21
+
20
22
  opt.on("-e", "--emails LISTOFEMAILS", Array,
21
23
  "comma seperated list of email addresses of the users "\
22
24
  "you want to own the compass gems") {|emails| options[:emails] = emails}
@@ -32,9 +34,10 @@ module ErpDevSvcs
32
34
  puts opt_parser; exit if options[:emails].nil?
33
35
 
34
36
  ErpDevSvcs::Commands::Helper.exec_in_engines do |engine_name|
37
+ command = options[:remove] || "-a"
38
+
35
39
  options[:emails].each do |email|
36
- puts "Adding #{email} as an owner on #{engine_name}"
37
- result = %x[gem owner #{engine_name} -a #{email}]
40
+ result = %x[gem owner #{engine_name} #{command} #{email}]
38
41
  puts result
39
42
  end
40
43
  end
@@ -13,7 +13,7 @@ module ErpDevSvcs
13
13
  options = {}
14
14
 
15
15
  optparse = OptionParser.new do|opts|
16
- opts.banner = "Usage: compass-util push_gems [options]"
16
+ opts.banner = "Usage: compass_ae-dev push_gems [options]"
17
17
 
18
18
  options[:verbose] = false
19
19
  opts.on('-v', '--verbose', 'Output more information') do
@@ -15,7 +15,7 @@ module ErpDevSvcs
15
15
  :bundle => false}
16
16
 
17
17
  opt_parser = OptionParser.new do |opt|
18
- opt.banner = "Usage: compass-util test [OPTIONS]"
18
+ opt.banner = "Usage: compass_ae-dev test [OPTIONS]"
19
19
 
20
20
  opt.on("-g", "--gems [GEMLIST]", Array,
21
21
  "List of engines to operate on;"\
@@ -13,7 +13,7 @@ module ErpDevSvcs
13
13
  options = {:gems => nil}
14
14
 
15
15
  opt_parser = OptionParser.new do |opt|
16
- opt.banner = "Usage: compass-util test [OPTIONS]"
16
+ opt.banner = "Usage: compass_ae-dev test [OPTIONS]"
17
17
 
18
18
  opt.on("-g", "--gems [GEMLIST]", Array,
19
19
  "List of engines to test;"\
@@ -13,7 +13,7 @@ module ErpDevSvcs
13
13
  options = {:install => false, :gems => nil}
14
14
 
15
15
  opt_parser = OptionParser.new do |opt|
16
- opt.banner = "Usage: compass-util uninstall_gems"
16
+ opt.banner = "Usage: compass_ae-dev uninstall_gems"
17
17
 
18
18
  opt.on("-g", "--gems [GEMLIST]", Array,
19
19
  "List of gems to uninstall; defaults to all") {|gem| options[:gems] = gem}
@@ -1,8 +1,8 @@
1
1
  module ErpDevSvcs
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 3
4
- MINOR = 0
5
- TINY = 3
4
+ MINOR = 1
5
+ TINY = 0
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].compact.join('.')
8
8
  end
@@ -37,6 +37,12 @@ module Dummy
37
37
 
38
38
  # Enable the asset pipeline
39
39
  config.assets.enabled = true
40
+
41
+ # Enforce whitelist mode for mass assignment.
42
+ # This will create an empty whitelist of attributes available for mass-assignment for all models
43
+ # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
44
+ # parameters by using an attr_accessible or attr_protected declaration.
45
+ config.active_record.whitelist_attributes = true
40
46
  end
41
47
  end
42
48
 
@@ -1,6 +1,9 @@
1
1
  Dummy::Application.configure do
2
2
  # Settings specified here will take precedence over those in config/application.rb
3
3
 
4
+ # Raise exception on mass assignment protection for Active Record models
5
+ config.active_record.mass_assignment_sanitizer = :strict
6
+
4
7
  # In the development environment your application's code is reloaded on
5
8
  # every request. This slows down response time but is perfect for development
6
9
  # since you don't have to restart the web server when you make code changes.
File without changes
@@ -0,0 +1,2 @@
1
+ Connecting to database specified by database.yml
2
+ Connecting to database specified by database.yml
@@ -1,25 +1,68 @@
1
- ENGINE_RAILS_ROOT=File.join(File.dirname(__FILE__), '../')
2
- DUMMY_APP_ROOT=File.join(File.dirname(__FILE__), '/dummy')
3
-
4
- require 'active_support'
5
- require 'active_model'
6
- require 'active_record'
7
- require 'action_controller'
8
-
9
- # Configure Rails Envinronment
10
- ENV["RAILS_ENV"] = "spec"
11
- require File.expand_path(DUMMY_APP_ROOT + "/config/environment.rb", __FILE__)
12
-
13
- ActiveRecord::Base.configurations = YAML::load(IO.read(DUMMY_APP_ROOT + "/config/database.yml"))
14
- ActiveRecord::Base.establish_connection(ENV["DB"] || "spec")
15
- ActiveRecord::Migration.verbose = false
16
- load(File.join(DUMMY_APP_ROOT, "db", "schema.rb"))
17
-
18
- # Requires supporting ruby files with custom matchers and macros, etc,
19
- # in spec/support/ and its subdirectories.
20
- Dir[File.join(ENGINE_RAILS_ROOT, "spec/support/**/*.rb")].each {|f| require f }
21
-
22
- require 'rspec/rails'
23
- RSpec.configure do |config|
24
- config.use_transactional_fixtures = true
25
- end
1
+ require 'spork'
2
+ require 'rake'
3
+ require 'factory_girl'
4
+ require 'rails/generators'
5
+
6
+ Spork.prefork do
7
+ # Loading more in this block will cause your tests to run faster. However,
8
+ # if you change any configuration or code from libraries loaded here, you'll
9
+ # need to restart spork for it take effect.
10
+
11
+ ENGINE_RAILS_ROOT=File.join(File.dirname(__FILE__), '../')
12
+ DUMMY_APP_ROOT=File.join(File.dirname(__FILE__), '/dummy')
13
+
14
+ require 'active_support'
15
+ require 'active_model'
16
+ require 'active_record'
17
+ require 'action_controller'
18
+
19
+ # Configure Rails Envinronment
20
+ ENV["RAILS_ENV"] = "spec"
21
+ require File.expand_path(DUMMY_APP_ROOT + "/config/environment.rb", __FILE__)
22
+
23
+ ActiveRecord::Base.configurations = YAML::load(IO.read(DUMMY_APP_ROOT + "/config/database.yml"))
24
+ ActiveRecord::Base.establish_connection(ENV["DB"] || "spec")
25
+ ActiveRecord::Migration.verbose = false
26
+
27
+ # Requires supporting ruby files with custom matchers and macros, etc,
28
+ # in spec/support/ and its subdirectories.
29
+ Dir[File.join(ENGINE_RAILS_ROOT, "spec/support/**/*.rb")].each {|f| require f }
30
+
31
+ require 'rspec/rails'
32
+ require 'erp_dev_svcs'
33
+
34
+ RSpec.configure do |config|
35
+ config.use_transactional_fixtures = true
36
+ config.include FactoryGirl::Syntax::Methods
37
+ config.include ErpDevSvcs
38
+ config.include ErpDevSvcs::ControllerSupport, :type => :controller
39
+ end
40
+ end
41
+
42
+ Spork.each_run do
43
+ #We have to execute the migrations from dummy app directory
44
+ Dir.chdir DUMMY_APP_ROOT
45
+ `rake db:drop RAILS_ENV=spec`
46
+ Dir.chdir ENGINE_RAILS_ROOT
47
+
48
+ #We have to execute the migratiapp:compass_ae:install:data_migrationsons from dummy app directory
49
+ Dir.chdir DUMMY_APP_ROOT
50
+
51
+
52
+ `rake compass_ae:install:migrations RAILS_ENV=spec`
53
+ `rake compass_ae:install:data_migrations RAILS_ENV=spec`
54
+ `rake db:migrate RAILS_ENV=spec`
55
+ `rake db:migrate_data RAILS_ENV=spec`
56
+ Dir.chdir ENGINE_RAILS_ROOT
57
+
58
+ ErpDevSvcs::FactorySupport.load_engine_factories
59
+
60
+ require 'simplecov'
61
+ SimpleCov.start 'rails' do
62
+ add_filter "spec/"
63
+ end
64
+ #Need to explictly load the files in lib/ until we figure out how to
65
+ #get rails to autoload them for spec like it used to...
66
+ Dir[File.join(ENGINE_RAILS_ROOT, "lib/**/*.rb")].each {|f| load f}
67
+ Dir[File.join(ENGINE_RAILS_ROOT, "app/models/extensions/**/*.rb")].each {|f| load f}
68
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: erp_dev_svcs
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.3
4
+ version: 3.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,112 +9,29 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-10 00:00:00.000000000 Z
12
+ date: 2013-01-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: erp_base_erp_svcs
16
- requirement: &70152217644920 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: '3.0'
21
+ version: '3.1'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70152217644920
25
- - !ruby/object:Gem::Dependency
26
- name: cucumber-rails
27
- requirement: &70152217644200 !ruby/object:Gem::Requirement
28
- none: false
29
- requirements:
30
- - - ~>
31
- - !ruby/object:Gem::Version
32
- version: 1.1.1
33
- type: :runtime
34
- prerelease: false
35
- version_requirements: *70152217644200
36
- - !ruby/object:Gem::Dependency
37
- name: database_cleaner
38
- requirement: &70152217643820 !ruby/object:Gem::Requirement
39
- none: false
40
- requirements:
41
- - - ! '>='
42
- - !ruby/object:Gem::Version
43
- version: '0'
44
- type: :runtime
45
- prerelease: false
46
- version_requirements: *70152217643820
47
- - !ruby/object:Gem::Dependency
48
- name: factory_girl_rails
49
- requirement: &70152217643280 !ruby/object:Gem::Requirement
50
- none: false
51
- requirements:
52
- - - ~>
53
- - !ruby/object:Gem::Version
54
- version: 1.3.0
55
- type: :runtime
56
- prerelease: false
57
- version_requirements: *70152217643280
58
- - !ruby/object:Gem::Dependency
59
- name: rspec-rails
60
- requirement: &70152217642760 !ruby/object:Gem::Requirement
61
- none: false
62
- requirements:
63
- - - ~>
64
- - !ruby/object:Gem::Version
65
- version: '2.7'
66
- type: :runtime
67
- prerelease: false
68
- version_requirements: *70152217642760
69
- - !ruby/object:Gem::Dependency
70
- name: simplecov
71
- requirement: &70152217642280 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
72
25
  none: false
73
26
  requirements:
74
27
  - - ~>
75
28
  - !ruby/object:Gem::Version
76
- version: '0.5'
77
- type: :runtime
78
- prerelease: false
79
- version_requirements: *70152217642280
80
- - !ruby/object:Gem::Dependency
81
- name: spork
82
- requirement: &70152217641820 !ruby/object:Gem::Requirement
83
- none: false
84
- requirements:
85
- - - ~>
86
- - !ruby/object:Gem::Version
87
- version: 0.9.0.rc
88
- type: :runtime
89
- prerelease: false
90
- version_requirements: *70152217641820
91
- - !ruby/object:Gem::Dependency
92
- name: sqlite3
93
- requirement: &70152217641360 !ruby/object:Gem::Requirement
94
- none: false
95
- requirements:
96
- - - ~>
97
- - !ruby/object:Gem::Version
98
- version: 1.3.4
99
- type: :runtime
100
- prerelease: false
101
- version_requirements: *70152217641360
102
- - !ruby/object:Gem::Dependency
103
- name: watchr
104
- requirement: &70152217640980 !ruby/object:Gem::Requirement
105
- none: false
106
- requirements:
107
- - - ! '>='
108
- - !ruby/object:Gem::Version
109
- version: '0'
110
- type: :runtime
111
- prerelease: false
112
- version_requirements: *70152217640980
29
+ version: '3.1'
113
30
  description: This engine exists as development support for CompassAE.
114
31
  email:
115
32
  - russonrails@gmail.com
116
33
  executables:
117
- - compass-util
34
+ - compass_ae-dev
118
35
  extensions: []
119
36
  extra_rdoc_files: []
120
37
  files:
@@ -160,6 +77,8 @@ files:
160
77
  - spec/dummy/config/locales/en.yml
161
78
  - spec/dummy/config/routes.rb
162
79
  - spec/dummy/config.ru
80
+ - spec/dummy/db/spec.sqlite3
81
+ - spec/dummy/log/spec.log
163
82
  - spec/dummy/public/404.html
164
83
  - spec/dummy/public/422.html
165
84
  - spec/dummy/public/500.html
@@ -167,8 +86,7 @@ files:
167
86
  - spec/dummy/Rakefile
168
87
  - spec/dummy/script/rails
169
88
  - spec/spec_helper.rb
170
- - !binary |-
171
- YmluL2NvbXBhc3MtdXRpbA==
89
+ - bin/compass_ae-dev
172
90
  homepage: http://development.compassagile.com
173
91
  licenses: []
174
92
  post_install_message:
@@ -181,15 +99,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
181
99
  - - ! '>='
182
100
  - !ruby/object:Gem::Version
183
101
  version: '0'
102
+ segments:
103
+ - 0
104
+ hash: -631967722121798005
184
105
  required_rubygems_version: !ruby/object:Gem::Requirement
185
106
  none: false
186
107
  requirements:
187
108
  - - ! '>='
188
109
  - !ruby/object:Gem::Version
189
110
  version: '0'
111
+ segments:
112
+ - 0
113
+ hash: -631967722121798005
190
114
  requirements: []
191
115
  rubyforge_project:
192
- rubygems_version: 1.8.11
116
+ rubygems_version: 1.8.24
193
117
  signing_key:
194
118
  specification_version: 3
195
119
  summary: This engine exists to serve as a way to organize code that exists to support
@@ -214,6 +138,8 @@ test_files:
214
138
  - spec/dummy/config/locales/en.yml
215
139
  - spec/dummy/config/routes.rb
216
140
  - spec/dummy/config.ru
141
+ - spec/dummy/db/spec.sqlite3
142
+ - spec/dummy/log/spec.log
217
143
  - spec/dummy/public/404.html
218
144
  - spec/dummy/public/422.html
219
145
  - spec/dummy/public/500.html