krl 0.1.59 → 0.1.60

Sign up to get free protection for your applications and to get access to all the features.
data/bin/krl CHANGED
@@ -11,7 +11,7 @@ COMMANDS = {
11
11
  "update" => lambda { |args| require LIB_DIR + 'update'; KRL_CMD::Update.go(args) },
12
12
  "versions" => lambda { |args| require LIB_DIR + 'versions'; KRL_CMD::Versions.go(args) },
13
13
  "deploy" => lambda { |args| require LIB_DIR + 'deploy'; KRL_CMD::Deploy.go(args) },
14
- "commit" => lambda { |args| require LIB_DIR + 'commit'; KRL_CMD::Commit.go },
14
+ "commit" => lambda { |args| require LIB_DIR + 'commit'; KRL_CMD::Commit.go(args) },
15
15
  "show" => lambda { |args| require LIB_DIR + 'show'; KRL_CMD::Show.go(args) },
16
16
  "note" => lambda { |args| require LIB_DIR + 'note'; KRL_CMD::Note.go(args) },
17
17
  "check" => lambda { |args| require LIB_DIR + 'check'; KRL_CMD::Check.go(args) },
@@ -31,4 +31,4 @@ if COMMANDS.keys.include? cmd
31
31
  end
32
32
  else
33
33
  puts banner
34
- end
34
+ end
@@ -5,6 +5,9 @@ require "sinatra/base"
5
5
  require "yaml"
6
6
  require "kynetx_am_api"
7
7
 
8
+ #TODO: add launchy gem to make the browser automatically popup.
9
+ #TODO: make it so you can connect without a web page
10
+
8
11
  CONFIG_FILE = ENV["HOME"] + "/.krl/credentials.yml"
9
12
  class KRLConnect < Sinatra::Base
10
13
  set :environment, :production
@@ -55,4 +58,4 @@ class KRLConnect < Sinatra::Base
55
58
  end
56
59
  end
57
60
 
58
- KRLConnect.run!
61
+ KRLConnect.run!
@@ -4,6 +4,10 @@ require 'fileutils'
4
4
  module KRL_CMD
5
5
  class Checkout
6
6
  def self.go(args)
7
+ require LIB_DIR + 'common'
8
+ app = KRL_COMMON::get_app rescue nil
9
+ raise "You are already in an application: #{app.application_id}" if app
10
+
7
11
  ruleset_id = args.to_s
8
12
  puts "Checking out: #{ruleset_id}"
9
13
  raise "Please specify a ruleset id." if ruleset_id.empty?
@@ -25,4 +29,4 @@ module KRL_CMD
25
29
 
26
30
  end
27
31
  end
28
- end
32
+ end
@@ -1,15 +1,16 @@
1
1
  module KRL_CMD
2
2
  class Commit
3
- def self.go
3
+ def self.go(args)
4
4
  require LIB_DIR + 'common'
5
5
  app = KRL_COMMON::get_app
6
6
  krl_file = File.join(Dir.pwd, app.application_id + ".krl")
7
7
  if File.exists?(krl_file)
8
8
  app.krl = File.open(krl_file, 'r') { |f| f.read }
9
+ app.set_version_note(app.version, args.to_s) if args.to_s != ""
9
10
  else
10
11
  raise "Unable to find file: #{krl_file}"
11
12
  end
12
13
  puts "Committed version #{app.version}"
13
14
  end
14
15
  end
15
- end
16
+ end
@@ -34,7 +34,9 @@ module KRL_CMD
34
34
  puts " ".ljust(20) + "Example: krl update"
35
35
  puts " ".ljust(20) + "or: krl update 10"
36
36
  puts "commit".ljust(20) + "Uploads your .krl file as the latest version. "
37
- puts " ".ljust(20) + "Example: krl commit"
37
+ puts " ".ljust(20) + "Example: krl commit"
38
+ puts " ".ljust(20) + "You can also specify a comment for the version you are committing."
39
+ puts " ".ljust(20) + "Example: krl commit \"This will be production\""
38
40
  puts "deploy".ljust(20) + "Deploys a version of your application. If no version is"
39
41
  puts " ".ljust(20) + "specified then the latest version is deployed."
40
42
  puts " ".ljust(20) + "Example: krl deploy"
@@ -72,4 +74,4 @@ module KRL_CMD
72
74
  puts
73
75
  end
74
76
  end
75
- end
77
+ end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 59
9
- version: 0.1.59
8
+ - 60
9
+ version: 0.1.60
10
10
  platform: ruby
11
11
  authors:
12
12
  - Michael Farmer, Cid Dennis
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-05-27 00:00:00 -06:00
17
+ date: 2010-06-01 00:00:00 -06:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency