mobi_check_in 0.0.4 → 0.0.5

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/bin/{ci → mci} RENAMED
File without changes
data/bin/{cic → mcic} RENAMED
File without changes
data/bin/{cii → mcii} RENAMED
File without changes
@@ -1,3 +1,3 @@
1
1
  module MobiCheckIn
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
data/lib/mobi_check_in.rb CHANGED
@@ -3,12 +3,27 @@ require "mobi_check_in/git"
3
3
  require "yaml"
4
4
 
5
5
  module MobiCheckIn
6
+
7
+ def self.isWindows?
8
+ platform = RUBY_PLATFORM.downcase
9
+ windows_names = %Q{mswin cygwin mingw}
10
+ windows_names.each { |name| return true if platform.include?(name) }
11
+ false
12
+ end
13
+
14
+ def self.history_file
15
+ if isWindows?
16
+ '~/AppData/Local/Temp/mobi_check_in.yml'
17
+ else
18
+ '/tmp/mobi_check_in_history.yml'
19
+ end
20
+ end
21
+
6
22
  def self.incremental options={}
7
23
  pair_names = ""
8
24
  story_number = ""
9
25
 
10
26
  if Git.has_local_changes?
11
- history_file = '/tmp/mobi_check_in_history.yml'
12
27
  if File.exists?(history_file)
13
28
  shove_history = YAML::load(File.open(history_file))["shove"]
14
29
  pair_names = shove_history["pair"]
@@ -24,6 +39,7 @@ module MobiCheckIn
24
39
  begin
25
40
  $stdout.write "Story number (NA) [#{story_number}]: "
26
41
  input = $stdin.gets.strip
42
+ input = "MOBI-#{input}" if input =~ /^\d*$/
27
43
  story_number = input unless input.empty?
28
44
  end until !story_number.empty?
29
45
 
@@ -34,7 +50,6 @@ module MobiCheckIn
34
50
  if story_number.delete("/").downcase == "na"
35
51
  commit_message = ""
36
52
  else
37
- story_numbe = "MOBI-#{story_number}" if story_number =~ /^\d*$/
38
53
  commit_message = "#{story_number} - #{pair_names} - "
39
54
  end
40
55
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mobi_check_in
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,15 +9,15 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-04 00:00:00.000000000 Z
12
+ date: 2012-12-13 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: A check in gem
15
15
  email:
16
16
  - kormie@gmail.com
17
17
  executables:
18
- - ci
19
- - cic
20
- - cii
18
+ - mci
19
+ - mcic
20
+ - mcii
21
21
  extensions: []
22
22
  extra_rdoc_files: []
23
23
  files:
@@ -27,9 +27,9 @@ files:
27
27
  - LICENSE.txt
28
28
  - README.md
29
29
  - Rakefile
30
- - bin/ci
31
- - bin/cic
32
- - bin/cii
30
+ - bin/mci
31
+ - bin/mcic
32
+ - bin/mcii
33
33
  - lib/mobi_check_in.rb
34
34
  - lib/mobi_check_in/git.rb
35
35
  - lib/mobi_check_in/version.rb