timewizard 0.3.4 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 4911c115b2ea48bb90815670d622ec14c98f0888
4
- data.tar.gz: 567812019510072453905d8d7d1eb1287c27327c
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ YWY1NDgxOTA5OWNkZTY1MTY3NDhlNGQzOTVlZGYyMmJjN2FmYWFiZg==
5
+ data.tar.gz: !binary |-
6
+ YzQ2ZmI1YWEzZWIzYzc2ZTVkYzViM2E4OGM5NTc5NGRmNTVhMzNmOA==
5
7
  SHA512:
6
- metadata.gz: a55e32fb72b0d4aa42ad06e04038e9207619eec003fb2fb62ac115c9c84ee5ca0bf630e698e174a2fda612d3c128bc294186428bd492f51192e2d548251d5d9b
7
- data.tar.gz: c03c5c488361a4f08085239438972d303cfa29e0daf6362b1d7d7ede9e17be41c11a115b1c2a51fec8dfcad47fc341f7fcebc0ede7788bb4aa1f8fc89ab2f67a
8
+ metadata.gz: !binary |-
9
+ NDZhYTE3NGE5YzZhOTRmMTkwYmY5YTVlZWUzNmM5N2UyOTM3MjJhNTFkYzcy
10
+ MzAwZGJhYjI2Y2YzNjBhODU3YTRhMjIwZmI0NGZiNjEyOWI2N2Y1ZWQzNzdl
11
+ NjU4ZmUwMjQwYTJmYjZlNzMxNjFiYzEyMjVlOTVjMzJkNzBlYmI=
12
+ data.tar.gz: !binary |-
13
+ YjVjMjUwMTVlZGFmNDU0MzRhYTI4NjEzYzVkODg2Y2E3NTFiNTIxMTI3ZDFm
14
+ ZWIyNTFjODYzYjg3MDk1YTU5OGJhYTAzOWQ4ODZlZTU4MjdjMjM3NTM0NDc2
15
+ MjNjMGNlMGFhZTVhMjIwMmI3YmU5ZDBhZmRiZDExYWIzZjM1OGM=
data/.rgitflow ADDED
@@ -0,0 +1 @@
1
+ develop: development
data/Rakefile CHANGED
@@ -46,6 +46,8 @@ require 'yard'
46
46
  YARD::Rake::YardocTask.new
47
47
  task :doc => :yard
48
48
 
49
- require "bundler/gem_tasks"
49
+ require 'bundler/gem_tasks'
50
50
 
51
51
  Rake::Task[:build].enhance [:clean]
52
+
53
+ require 'rgitflow'
@@ -3,5 +3,5 @@
3
3
  module Timewizard
4
4
  # Version of this gem.
5
5
  # @return [String] current version
6
- VERSION = "0.3.4"
6
+ VERSION = "0.3.5"
7
7
  end
@@ -130,5 +130,6 @@ module Timewizard
130
130
 
131
131
  autoload :Android, 'timewizard/versioner/android'
132
132
  autoload :Apple, 'timewizard/versioner/apple'
133
+ autoload :Worklight, 'timewizard/versioner/worklight'
133
134
  end
134
135
  end
@@ -0,0 +1,96 @@
1
+ require 'timewizard/versioner'
2
+
3
+ module Timewizard
4
+ module Versioner
5
+ # Represents the Worklight implementation of the versioner spec.
6
+ # @author Richard Harrah
7
+ # @since 0.1.0
8
+ class Worklight < Timewizard::Versioner::Base
9
+
10
+ #
11
+ # Public functions (inherited from parent)
12
+ #
13
+ public
14
+
15
+ def initialize(path_to_file)
16
+ super path_to_file
17
+ @file_contents = ''
18
+ end
19
+
20
+ #
21
+ # Private functions (implementation specific)
22
+ #
23
+ private
24
+
25
+ SPACE_REGEX = /\s+/
26
+
27
+ def read_file
28
+ if @file.nil?
29
+ raise 'file is nil and cannot be read'
30
+ end
31
+
32
+ @file_contents = ''
33
+
34
+ if File.exist?(@file)
35
+ @file_contents = File.open(@file, 'r+') { |f| f.read }
36
+ end
37
+
38
+ @file_contents
39
+ end
40
+
41
+ def write_file
42
+ if @file.nil?
43
+ raise 'file is nil and cannot be written'
44
+ end
45
+ if @file_contents.nil?
46
+ raise 'file_contents is null and cannot be written'
47
+ end
48
+ File.open(@file, 'w') { |file| file.write(@file_contents) }
49
+ end
50
+
51
+ def find_build_and_version_numbers
52
+ if @file_contents.nil?
53
+ read_file
54
+ end
55
+ matched = @file_contents.match "version=\"(.*)\">"
56
+
57
+ first_match = matched[0]
58
+ split_match = first_match.partition(SPACE_REGEX)
59
+
60
+ build_num = Timewizard::Utils::Wizardry.only_version split_match[0]
61
+
62
+ parsed_build_num = Versionomy.parse(build_num, Versionomy::Format.get('rubygems'))
63
+
64
+ @bumped_build_number = parsed_build_num.bump(parsed_build_num.parts.length - 1)
65
+
66
+ obn = parsed_build_num.unparse
67
+ ovn = parsed_build_num.unparse
68
+ nbn = parsed_build_num.bump(parsed_build_num.parts.length - 1).unparse
69
+ nvn = ovn
70
+
71
+ [obn, ovn, nbn, nvn]
72
+ end
73
+
74
+ def change_build_numbers
75
+ if @file_contents.nil?
76
+ read_file
77
+ end
78
+ if @new_build_number.nil?
79
+ read_build_numbers
80
+ end
81
+ @file_contents.gsub!(@old_build_number.to_s, @new_build_number.to_s)
82
+ end
83
+
84
+ def change_version_numbers
85
+ if @file_contents.nil?
86
+ read_file
87
+ end
88
+ if @new_version_number.nil?
89
+ read_version_numbers
90
+ end
91
+ @file_contents.gsub!(@old_version_number.to_s, @new_version_number.to_s)
92
+ end
93
+
94
+ end
95
+ end
96
+ end
@@ -0,0 +1,38 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!-- Licensed Materials - Property of IBM
3
+ 5725-I43 (C) Copyright IBM Corp. 2006, 2013. All Rights Reserved.
4
+ US Government Users Restricted Rights - Use, duplication or
5
+ disclosure restricted by GSA ADP Schedule Contract with IBM Corp. -->
6
+ <!-- Attribute "id" must be identical to application folder name -->
7
+ <application xmlns="http://www.worklight.com/application-descriptor" id="test" platformVersion="6.2.0.01.20150114-1718">
8
+ <displayName>test</displayName>
9
+ <description>test</description>
10
+ <author>
11
+ <name>test</name>
12
+ <email>application author's e-mail</email>
13
+ <homepage>test</homepage>
14
+ <copyright>Copyright 2015 test</copyright>
15
+ </author>
16
+ <mainFile>index.html</mainFile>
17
+ <features>
18
+ <JSONStore/>
19
+ </features>
20
+ <thumbnailImage>test</thumbnailImage>
21
+ <iphone bundleId="test.app" version="0.0.1">
22
+ <worklightSettings include="false"/>
23
+ <security>
24
+ <encryptWebResources enabled="false"/>
25
+ <testWebResourcesChecksum enabled="false" ignoreFileExtensions="png, jpg, jpeg, gif, mp4, mp3"/>
26
+ </security>
27
+ </iphone>
28
+ <android version="0.0.1">
29
+ <worklightSettings include="false"/>
30
+ <security>
31
+ <encryptWebResources enabled="false"/>
32
+ <testWebResourcesChecksum enabled="false" ignoreFileExtensions="png, jpg, jpeg, gif, mp4, mp3"/>
33
+ <publicSigningKey/>
34
+ <packageName>test.app</packageName>
35
+ </security>
36
+ </android>
37
+ <mobileWebApp cacheManifest="no-use"/>
38
+ </application>
data/timewizard.gemspec CHANGED
@@ -32,4 +32,5 @@ Gem::Specification.new do |gem|
32
32
  gem.add_development_dependency 'yard', '~> 0.8'
33
33
  gem.add_development_dependency 'codeclimate-test-reporter', '~> 0.4'
34
34
  gem.add_development_dependency 'fuubar', '~> 2.0'
35
+ gem.add_development_dependency 'rgitflow', '~> 0.2'
35
36
  end
metadata CHANGED
@@ -1,127 +1,141 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: timewizard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Harrah
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-10-17 00:00:00.000000000 Z
11
+ date: 2015-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: versionomy
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0.4'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0.4'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: CFPropertyList
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: '2.3'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: '2.3'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: '1.10'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.10'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: '10.0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ~>
67
67
  - !ruby/object:Gem::Version
68
68
  version: '10.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ~>
74
74
  - !ruby/object:Gem::Version
75
75
  version: '3.3'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ~>
81
81
  - !ruby/object:Gem::Version
82
82
  version: '3.3'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: yard
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ~>
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0.8'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ~>
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0.8'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: codeclimate-test-reporter
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - ~>
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0.4'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - "~>"
108
+ - - ~>
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0.4'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: fuubar
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - "~>"
115
+ - - ~>
116
116
  - !ruby/object:Gem::Version
117
117
  version: '2.0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - "~>"
122
+ - - ~>
123
123
  - !ruby/object:Gem::Version
124
124
  version: '2.0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: rgitflow
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ~>
130
+ - !ruby/object:Gem::Version
131
+ version: '0.2'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ~>
137
+ - !ruby/object:Gem::Version
138
+ version: '0.2'
125
139
  description: Uses the RubyGems style of versioning in order to ease updates.
126
140
  email: topplethenunnery@gmail.com
127
141
  executables: []
@@ -131,12 +145,13 @@ extra_rdoc_files:
131
145
  - LICENSE.txt
132
146
  - README.rdoc
133
147
  files:
134
- - ".codeclimate.yml"
135
- - ".document"
136
- - ".gitignore"
137
- - ".rspec"
138
- - ".travis.yml"
139
- - ".yardopts"
148
+ - .codeclimate.yml
149
+ - .document
150
+ - .gitignore
151
+ - .rgitflow
152
+ - .rspec
153
+ - .travis.yml
154
+ - .yardopts
140
155
  - CODE_OF_CONDUCT.md
141
156
  - ChangeLog.rdoc
142
157
  - Gemfile
@@ -150,6 +165,7 @@ files:
150
165
  - lib/timewizard/versioner.rb
151
166
  - lib/timewizard/versioner/android.rb
152
167
  - lib/timewizard/versioner/apple.rb
168
+ - lib/timewizard/versioner/worklight.rb
153
169
  - resources/android/AndroidManifest.xml
154
170
  - resources/apple/TestApp/TestApp.xcodeproj/project.pbxproj
155
171
  - resources/apple/TestApp/TestApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -164,6 +180,7 @@ files:
164
180
  - resources/apple/TestApp/TestApp/main.m
165
181
  - resources/apple/TestApp/TestAppTests/Info.plist
166
182
  - resources/apple/TestApp/TestAppTests/TestAppTests.m
183
+ - resources/worklight/application-descriptor.xml
167
184
  - timewizard.gemspec
168
185
  homepage: https://nunnery.github.io/timewizard
169
186
  licenses:
@@ -175,19 +192,18 @@ require_paths:
175
192
  - lib
176
193
  required_ruby_version: !ruby/object:Gem::Requirement
177
194
  requirements:
178
- - - ">="
195
+ - - ! '>='
179
196
  - !ruby/object:Gem::Version
180
197
  version: '0'
181
198
  required_rubygems_version: !ruby/object:Gem::Requirement
182
199
  requirements:
183
- - - ">="
200
+ - - ! '>='
184
201
  - !ruby/object:Gem::Version
185
202
  version: '0'
186
203
  requirements: []
187
204
  rubyforge_project:
188
- rubygems_version: 2.4.8
205
+ rubygems_version: 2.2.2
189
206
  signing_key:
190
207
  specification_version: 4
191
208
  summary: A Ruby library for parsing and changing iOS and Android version numbers.
192
209
  test_files: []
193
- has_rdoc: