tddium-preview 0.6.18 → 0.6.19

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/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tddium-preview (0.6.18)
4
+ tddium-preview (0.6.19)
5
5
  bundler
6
6
  highline
7
7
  json
@@ -220,43 +220,56 @@ Push URL: <%=suite["ci_push_url"]%>
220
220
  Notifications:
221
221
  <%=suite["ci_notifications"]%>
222
222
 
223
- Authorize the following SSH key to let Tddium's pulls and pushes through:
223
+ >>> Authorize the following SSH key to let Tddium's pulls and pushes through:
224
224
 
225
225
  <%=suite["ci_ssh_pubkey"]%>
226
226
  <% if suite["ci_pull_url"] =~ /^git@github.com:(.*).git$/ %>
227
227
  Tddium will pull from your Github repository. Visit
228
+
228
229
  https://github.com/<%= $1 %>/admin/keys
230
+
229
231
  then click "Add another deploy key" and copy and paste the above key.
230
232
  <% end %>
231
233
  <% if suite["ci_push_url"] =~ /^git@heroku.com:(.*).git$/ %>
232
234
  Tddium will push to your Heroku application <%= $1 %>.
233
235
  To authorize the key, use the following command:
236
+
234
237
  heroku keys:add <%= tddium_deploy_key_file_name %> --app <%= $1 %>
235
238
  <% end %>
236
239
 
237
240
  <% if suite["ci_pull_url"] =~ /^git@github.com:(.*).git$/ %>
238
- Github can notify Tddium of your commits with a post-receive hook. Visit
241
+ >>> Github can notify Tddium of your commits with a post-receive hook. Visit
242
+
239
243
  https://github.com/<%= $1 %>/admin/hooks#generic_minibucket
244
+
240
245
  then add the following URL and click "Update Settings":
246
+
241
247
  <%=suite["hook_uri"]%>
242
248
  <% else %>
243
- It looks like you aren't using Github, so you'll need to manually configure
244
- your post-commit hook. In Unix-based Git repositories, find the repository
245
- root and look for a shell script in `.git/hooks/post-commit`.
249
+ >>> In order for Tddium to know that your repo has changed, you'll need to configure
250
+ a post-commit hook in your Git server.
251
+
252
+ In Unix-based Git repositories, find the repository root and look for a shell
253
+ script in `.git/hooks/post-commit`.
254
+
246
255
  To trigger CI builds, POST to the following URL from a post-commit hook:
256
+ <%=suite["hook_uri"]%>
247
257
  <% end %>
248
258
 
249
- See http://www.tddium.com/support for more information on Tddium CI.
259
+ >>> See http://www.tddium.com/support for more information on Tddium CI.
250
260
  <% end %>
251
261
 
252
- If your tests don't require a database, you're all set and can now run
253
- tddium spec.
262
+ If your tests don't require a database or your app uses pure ActiveRecord you're
263
+ all set and can now run tddium spec.
254
264
 
255
- If your tests do use a database, you'll now need to configure your
256
- database setup. See http://www.tddium.com/support/reference#setup_hooks
257
- to create a Rake task for Tddium to set up your database.
265
+ If your app needs database-specific features (triggers, stored procedures),
266
+ you'll need to configure a custom database setup hook.
267
+ See http://www.tddium.com/support/reference#setup_hooks to create a Rake task for
268
+ Tddium to set up your database.
258
269
 
259
270
  Run 'tddium suite --edit' to edit suite settings.
271
+
272
+ Run 'tddium spec' to run tests in this suite.
260
273
  EOF
261
274
  end
262
275
 
@@ -3,5 +3,5 @@ Copyright (c) 2011 Solano Labs All Rights Reserved
3
3
  =end
4
4
 
5
5
  module TddiumVersion
6
- VERSION = "0.6.18"
6
+ VERSION = "0.6.19"
7
7
  end
data/lib/tddium.rb CHANGED
@@ -35,6 +35,7 @@ class Tddium < Thor
35
35
  method_option :password, :type => :string, :default => nil
36
36
  method_option :ssh_key_file, :type => :string, :default => nil
37
37
  def account
38
+ set_shell
38
39
  set_default_environment(options[:environment])
39
40
  if user_details = user_logged_in?
40
41
  # User is already logged in, so just display the info
@@ -80,6 +81,7 @@ class Tddium < Thor
80
81
  method_option :ssh_key_file, :type => :string, :default => nil
81
82
  method_option :app, :type => :string, :default => nil
82
83
  def heroku
84
+ set_shell
83
85
  set_default_environment(options[:environment])
84
86
  if user_details = user_logged_in?
85
87
  # User is already logged in, so just display the info
@@ -110,6 +112,7 @@ class Tddium < Thor
110
112
  map "passwd" => :password
111
113
  method_option :environment, :type => :string, :default => nil
112
114
  def password
115
+ set_shell
113
116
  set_default_environment(options[:environment])
114
117
  return unless tddium_settings
115
118
  user_details = user_logged_in?
@@ -137,6 +140,7 @@ class Tddium < Thor
137
140
  method_option :email, :type => :string, :default => nil
138
141
  method_option :password, :type => :string, :default => nil
139
142
  def login
143
+ set_shell
140
144
  set_default_environment(options[:environment])
141
145
  if user_logged_in?
142
146
  say Text::Process::ALREADY_LOGGED_IN
@@ -148,6 +152,7 @@ class Tddium < Thor
148
152
  desc "logout", "Log out of tddium"
149
153
  method_option :environment, :type => :string, :default => nil
150
154
  def logout
155
+ set_shell
151
156
  set_default_environment(options[:environment])
152
157
  FileUtils.rm(tddium_file_name) if File.exists?(tddium_file_name)
153
158
  say Text::Process::LOGGED_OUT_SUCCESSFULLY
@@ -160,6 +165,7 @@ class Tddium < Thor
160
165
  method_option :test_pattern, :type => :string, :default => nil
161
166
  method_option :force, :type => :boolean, :default => false
162
167
  def spec
168
+ set_shell
163
169
  set_default_environment(options[:environment])
164
170
  git_version_ok
165
171
  if git_changes then
@@ -270,6 +276,7 @@ class Tddium < Thor
270
276
  desc "status", "Display information about this suite, and any open dev sessions"
271
277
  method_option :environment, :type => :string, :default => nil
272
278
  def status
279
+ set_shell
273
280
  set_default_environment(options[:environment])
274
281
  git_version_ok
275
282
  return unless git_repo? && tddium_settings && suite_for_current_branch?
@@ -521,7 +528,7 @@ class Tddium < Thor
521
528
  api_key = heroku_config['TDDIUM_API_KEY']
522
529
  user = tddium_client.call_api(:get, Api::Path::USERS, {}, api_key) rescue nil
523
530
  exit_failure Text::Error::HEROKU_MISCONFIGURED % "Unrecognized user" unless user
524
- say Text::Process::HEROKU_WELCOME % heroku_config['TDDIUM_USER_NAME']
531
+ say Text::Process::HEROKU_WELCOME % user["user"]["email"]
525
532
 
526
533
  if user["user"]["heroku_needs_activation"] == true
527
534
  say Text::Process::HEROKU_ACTIVATE
@@ -639,6 +646,12 @@ class Tddium < Thor
639
646
  [use_existing_suite, existing_suite]
640
647
  end
641
648
 
649
+ def set_shell
650
+ if !$stdout.tty? || !$stderr.tty? then
651
+ @shell = Thor::Shell::Basic.new
652
+ end
653
+ end
654
+
642
655
  def set_default_environment(env)
643
656
  if env.nil?
644
657
  tddium_client.environment = :development
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: tddium-preview
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.6.18
5
+ version: 0.6.19
6
6
  platform: ruby
7
7
  authors:
8
8
  - Solano Labs
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-06-30 00:00:00 -07:00
13
+ date: 2011-07-07 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency