ors 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -1,5 +1,8 @@
1
1
  == Set Up
2
2
 
3
+ * Set up repo on eden
4
+
5
+
3
6
  Required Files:
4
7
  * .rvmrc
5
8
  * Gemfile
@@ -8,7 +11,6 @@ Required Files:
8
11
  * .git/config
9
12
  * config/unicorn.rb
10
13
 
11
-
12
14
  === Setting Up GitConfig
13
15
 
14
16
  [remote "production"]
@@ -32,7 +34,8 @@ On your ruby servers you should create a .rvmrc in the home directory of the use
32
34
  * rake
33
35
  * bundler
34
36
 
35
- ==== Gemfile
37
+
38
+ Gemfile
36
39
 
37
40
  group :production, :demo do
38
41
  gem 'unicorn'
@@ -25,6 +25,7 @@ Defaults to production.
25
25
  === Options
26
26
  --pretend (or -p) Don't execute anything, just show me what you're going to do (default: false)
27
27
  --no-gateway (or -ng) Don't use a gateway (if you're inside the firewall) (default: true)
28
+ --rails-2 (or -r2) Rails 2 application (use unicorn_rails instead of unicorn)
28
29
  END
29
30
  end
30
31
 
data/lib/ors/config.rb CHANGED
@@ -1,12 +1,13 @@
1
1
  module ORS
2
2
  module Config
3
3
 
4
- mattr_accessor :name, :environment, :use_gateway, :pretending, :log_lines
4
+ mattr_accessor :name, :environment, :use_gateway, :pretending, :log_lines, :rails2
5
5
 
6
6
  self.environment = "production"
7
7
  self.pretending = false
8
8
  self.use_gateway = true
9
9
  self.log_lines = 100
10
+ self.rails2 = false
10
11
 
11
12
  module ModuleMethods
12
13
 
@@ -18,6 +19,7 @@ module ORS
18
19
  case option
19
20
  when "-p", "--pretend" then self.pretending = true
20
21
  when "-ng", "--no-gateway" then self.use_gateway = false
22
+ when "-r2", "--rails-2" then self.rails2 = true
21
23
  end
22
24
  end
23
25
  end
@@ -43,6 +45,10 @@ module ORS
43
45
  end
44
46
  extend ModuleMethods
45
47
 
48
+ def unicorn
49
+ rails2 ? "unicorn-rails" : "unicorn"
50
+ end
51
+
46
52
  def gateway
47
53
  "deploy-gateway"
48
54
  end
data/lib/ors/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module ORS
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -7,6 +7,7 @@ describe ORS::Config do
7
7
  context ".parse_options" do
8
8
  it("should default pretend to false") { subject.pretending.should be_false }
9
9
  it("should default use_gateway to true") { subject.use_gateway.should be_true }
10
+ it("should default rails2 to false") { subject.rails2.should be_false }
10
11
 
11
12
  it "should set the environment when it is given" do
12
13
  ORS::Config.parse_options %w(foobar -p)
@@ -40,6 +41,20 @@ describe ORS::Config do
40
41
 
41
42
  subject.use_gateway.should be_false
42
43
  end
44
+
45
+ it "should set rails2 to true if -r2 is given" do
46
+ ORS::Config.rails2 = false
47
+ ORS::Config.parse_options %w(-r2)
48
+
49
+ subject.rails2.should be_true
50
+ end
51
+
52
+ it "should set rails2 to true if --rails-2 is given" do
53
+ ORS::Config.rails2 = false
54
+ ORS::Config.parse_options %w(--rails-2)
55
+
56
+ subject.rails2.should be_true
57
+ end
43
58
  end
44
59
 
45
60
  context ".valid_options?" do
@@ -6,6 +6,7 @@ describe ORS::Helpers do
6
6
 
7
7
  context "#execute_command" do
8
8
  before do
9
+ stub(subject).pretending { false }
9
10
  stub(subject).info(is_a(String)).returns "message"
10
11
  stub(subject).build_command.returns "command"
11
12
  stub(subject).`(is_a(String)) {'output'} # ` # syntax highlighting
metadata CHANGED
@@ -1,75 +1,58 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: ors
3
- version: !ruby/object:Gem::Version
4
- hash: 21
5
- prerelease:
6
- segments:
7
- - 0
8
- - 0
9
- - 5
10
- version: 0.0.5
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.6
5
+ prerelease: !!null
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Jason Dew and John Long
14
- autorequire:
9
+ autorequire: !!null
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-02-08 00:00:00 -05:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
12
+ date: 2011-02-08 00:00:00.000000000 -05:00
13
+ default_executable: !!null
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
22
16
  name: git
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
17
+ requirement: &2152570360 !ruby/object:Gem::Requirement
25
18
  none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 3
30
- segments:
31
- - 0
32
- version: "0"
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
22
+ version: '0'
33
23
  type: :runtime
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
36
- name: rspec
37
24
  prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
25
+ version_requirements: *2152570360
26
+ - !ruby/object:Gem::Dependency
27
+ name: rspec
28
+ requirement: &2152569940 !ruby/object:Gem::Requirement
39
29
  none: false
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- hash: 3
44
- segments:
45
- - 0
46
- version: "0"
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
47
34
  type: :development
48
- version_requirements: *id002
49
- - !ruby/object:Gem::Dependency
50
- name: rr
51
35
  prerelease: false
52
- requirement: &id003 !ruby/object:Gem::Requirement
36
+ version_requirements: *2152569940
37
+ - !ruby/object:Gem::Dependency
38
+ name: rr
39
+ requirement: &2152569520 !ruby/object:Gem::Requirement
53
40
  none: false
54
- requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- hash: 3
58
- segments:
59
- - 0
60
- version: "0"
41
+ requirements:
42
+ - - ! '>='
43
+ - !ruby/object:Gem::Version
44
+ version: '0'
61
45
  type: :development
62
- version_requirements: *id003
46
+ prerelease: false
47
+ version_requirements: *2152569520
63
48
  description: Heroku-like deployment utilities for ORS
64
- email:
49
+ email:
65
50
  - jason.dew@ors.sc.gov and john.long@ors.sc.gov
66
- executables:
51
+ executables:
67
52
  - ors
68
53
  extensions: []
69
-
70
54
  extra_rdoc_files: []
71
-
72
- files:
55
+ files:
73
56
  - .autotest
74
57
  - .gitignore
75
58
  - .rspec
@@ -107,40 +90,31 @@ files:
107
90
  - spec/ors/log_unifier_spec.rb
108
91
  - spec/spec_helper.rb
109
92
  has_rdoc: true
110
- homepage: ""
93
+ homepage: ''
111
94
  licenses: []
112
-
113
- post_install_message:
95
+ post_install_message: !!null
114
96
  rdoc_options: []
115
-
116
- require_paths:
97
+ require_paths:
117
98
  - lib
118
- required_ruby_version: !ruby/object:Gem::Requirement
99
+ required_ruby_version: !ruby/object:Gem::Requirement
119
100
  none: false
120
- requirements:
121
- - - ">="
122
- - !ruby/object:Gem::Version
123
- hash: 3
124
- segments:
125
- - 0
126
- version: "0"
127
- required_rubygems_version: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ! '>='
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ required_rubygems_version: !ruby/object:Gem::Requirement
128
106
  none: false
129
- requirements:
130
- - - ">="
131
- - !ruby/object:Gem::Version
132
- hash: 3
133
- segments:
134
- - 0
135
- version: "0"
107
+ requirements:
108
+ - - ! '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
136
111
  requirements: []
137
-
138
112
  rubyforge_project: ors
139
113
  rubygems_version: 1.5.0
140
- signing_key:
114
+ signing_key: !!null
141
115
  specification_version: 3
142
116
  summary: Heroku-like deployment utilities for ORS
143
- test_files:
117
+ test_files:
144
118
  - spec/ors/command_spec.rb
145
119
  - spec/ors/commands/base_spec.rb
146
120
  - spec/ors/commands/console_spec.rb