my-simon 0.3.0 → 0.3.1

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.
Files changed (5) hide show
  1. data/VERSION +1 -1
  2. data/bin/simon +7 -1
  3. data/lib/simon.rb +12 -0
  4. data/my-simon.gemspec +1 -1
  5. metadata +2 -2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.3.1
data/bin/simon CHANGED
@@ -19,7 +19,7 @@ require 'commander/import'
19
19
  simon_controller = Simon.new
20
20
  svn_path = "https://samcreate@evolveit.svn.beanstalkapp.com/project_boilerplate/trunk/default"
21
21
  svn_path_heroku = "https://samcreate@evolveit.svn.beanstalkapp.com/project_boilerplate/trunk/heroku"
22
- program :version, '0.0.1'
22
+ program :version, '0.3.1'
23
23
  program :description, 'CLI tool for Simon, a simple MVC boilerplate'
24
24
 
25
25
  command :create do |c|
@@ -30,6 +30,7 @@ command :create do |c|
30
30
  c.option '--some-switch', 'Some switch that does something'
31
31
  c.action do |args, options|
32
32
  # Do something or c.when_called My-simon::Commands::Create,
33
+ simon_controller.check_4_update
33
34
  simon_controller.msg ">>> simon's requesting the boilerplate <<<"
34
35
  cmd = "svn export #{svn_path} app --quiet"
35
36
  Kernel::system(cmd)
@@ -50,6 +51,7 @@ command :add do |c|
50
51
  c.option '--some-switch', 'Some switch that does something'
51
52
  c.action do |args, options|
52
53
  # Do something or c.when_called My-simon::Commands::Add,
54
+ simon_controller.check_4_update
53
55
  case args[0]
54
56
  when 'js'
55
57
  simon_controller.add_js args[1]
@@ -60,6 +62,8 @@ command :add do |c|
60
62
  simon_controller.msg "installing heroku files"
61
63
  when 'section'
62
64
  simon_controller.add_section
65
+ when 'test'
66
+
63
67
  end
64
68
  end
65
69
  end
@@ -71,6 +75,7 @@ command :setup do |c|
71
75
  c.example 'description', 'command example'
72
76
  c.option '--some-switch', 'Some switch that does something'
73
77
  c.action do |args, options|
78
+ simon_controller.check_4_update
74
79
  simon_controller.setup
75
80
  end
76
81
  end
@@ -82,6 +87,7 @@ command :help do |c|
82
87
  c.example 'description', 'command example'
83
88
  c.option '--some-switch', 'Some switch that does something'
84
89
  c.action do |args, options|
90
+ simon_controller.check_4_update
85
91
  # Do something or c.when_called My-simon::Commands::Help
86
92
  end
87
93
  end
@@ -217,6 +217,18 @@ class Simon
217
217
 
218
218
  end
219
219
 
220
+ def check_4_update
221
+
222
+
223
+ @local_version = program :version
224
+ @remote_version = open("https://raw.github.com/samcreate/simon-cli/master/VERSION") {|f| f.read }
225
+
226
+ if @local_version.strip != @remote_version.strip
227
+ puts "\n\n( ͡ʘ ʖ̲ ͡ʘ) - Out of Date! You're running #{@local_version}. Please update to the latest version #{@remote_version} \n\n ---> run: gem update my-simon\n\n"
228
+ end
229
+
230
+ end
231
+
220
232
  # TODO get beanstalk to fix their shit.
221
233
  # def setup_beanstalk
222
234
  # subdomain = ask("What is the Beanstalk subdomain? : ") { |q| q.echo = true }
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "my-simon"
8
- s.version = "0.3.0"
8
+ s.version = "0.3.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Aaron McGuire"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: my-simon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -194,7 +194,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
194
194
  version: '0'
195
195
  segments:
196
196
  - 0
197
- hash: 1313642089394545895
197
+ hash: 3800084442255931220
198
198
  required_rubygems_version: !ruby/object:Gem::Requirement
199
199
  none: false
200
200
  requirements: