motion-hockeyrink 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +3 -0
- data/lib/motion/project/hockeyapp.rb +3 -91
- data/lib/motion-hockeyrink.rb +0 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MjNmMWY5NjAxM2RmNTQyNDNjMDZmYWYyYTZhZmE4ZDRkMWQyZDMzMQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Yjg2MDg5ZDkyMmUyMTFjYmEyMmFkODI2NGYyZDhmNTQyNjM1MTE0Mg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YzY0ZjcyZTlkODdlZTlhYjdhMzg0NmE0OTI2N2Y2ZWQ5OTk1ODRiNGEyYzFj
|
10
|
+
MDY0YzVhZjc5ZjIxODY4NWMyYjgzZDEwYjM5YWY1YTU0ZDE3Mjg2N2NhMDlm
|
11
|
+
OTU5ZmRmYzM1NTM0YTEyMWZkZDhmMzYzYjExNTU1ZDg2MmI0N2I=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NWViYjZhNzEyZDYxMTNjYmQ3ODlkMDdlY2ExOGIwOThmOGMxYzQ4ODBkMGQy
|
14
|
+
YjJjMzE2YjVhZDQyMzgzMzQ2YWI2ZTdlZTM3NDlkZThlOTUxODY1ODBjNmYx
|
15
|
+
NmZkZTQwZmQ0NzZlMmY3OWNlNWQwZDk4OGM1Yzk0ZmI1MzdmOWE=
|
data/README.md
CHANGED
@@ -11,6 +11,9 @@ motion-hockeyrink allows RubyMotion projects to easily embed the [HockeyApp SDK]
|
|
11
11
|
In your Rakefile:
|
12
12
|
|
13
13
|
```ruby
|
14
|
+
require 'motion-hockeyrink'
|
15
|
+
|
16
|
+
# Mandatory for installation the HockeySDK pod
|
14
17
|
require 'motion-cocoapods'
|
15
18
|
|
16
19
|
Motion::Project::App.setup do |app|
|
@@ -23,100 +23,12 @@
|
|
23
23
|
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
24
24
|
# POSSIBILITY OF SUCH DAMAGE.
|
25
25
|
|
26
|
+
require 'hockeyapp-config'
|
27
|
+
|
26
28
|
unless defined?(Motion::Project::Config)
|
27
29
|
raise "This file must be required within a RubyMotion project Rakefile."
|
28
30
|
end
|
29
31
|
|
30
|
-
class HockeyAppConfig
|
31
|
-
PROPERTIES = HockeyApp::Version::ATTRIBUTES + HockeyApp::Version::POST_PAYLOAD + [:app_id, :api_token]
|
32
|
-
attr_accessor *PROPERTIES
|
33
|
-
|
34
|
-
# Coerce these values to be :symbols
|
35
|
-
[["NOTES_TYPES", "notes_type"], ["STATUS","status"]].each do |constant, prop|
|
36
|
-
# i.e. Hockey::Version::NOTES_TYPE_TO_SYM
|
37
|
-
constant = HockeyApp::Version.const_get(constant + "_TO_SYM")
|
38
|
-
define_method("#{prop}=") do |new_value|
|
39
|
-
if new_value.is_a?(Numeric)
|
40
|
-
new_value = constant[new_value]
|
41
|
-
end
|
42
|
-
instance_variable_set("@#{prop}", new_value.to_sym)
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
def notify=(notify)
|
47
|
-
@notify = string_or_num_to_bool(notify)
|
48
|
-
end
|
49
|
-
|
50
|
-
def mandatory=(mandatory)
|
51
|
-
@mandatory = string_or_num_to_bool(mandatory)
|
52
|
-
end
|
53
|
-
|
54
|
-
def initialize(config)
|
55
|
-
@config = config
|
56
|
-
end
|
57
|
-
|
58
|
-
def client
|
59
|
-
if !api_token
|
60
|
-
puts "You need to specify an app.hockeyapp.api_token"
|
61
|
-
return
|
62
|
-
end
|
63
|
-
@client ||= HockeyApp.build_client
|
64
|
-
end
|
65
|
-
|
66
|
-
def app
|
67
|
-
return if !client
|
68
|
-
|
69
|
-
@app ||= HockeyApp::App.from_hash({"public_identifier" => app_id}, client)
|
70
|
-
end
|
71
|
-
|
72
|
-
def api_token=(api_token)
|
73
|
-
@api_token = api_token
|
74
|
-
config_client
|
75
|
-
@api_token
|
76
|
-
end
|
77
|
-
|
78
|
-
def inspect
|
79
|
-
h = {}
|
80
|
-
PROPERTIES.each do |prop|
|
81
|
-
h[prop] = self.send(prop)
|
82
|
-
end
|
83
|
-
h
|
84
|
-
end
|
85
|
-
|
86
|
-
# Public: Creates a HockeyApp::Version object from this configuraiton
|
87
|
-
#
|
88
|
-
# Returns the new HockeyApp::Version object
|
89
|
-
def make_version
|
90
|
-
version = HockeyApp::Version.new(app, client)
|
91
|
-
version.notes = self.notes
|
92
|
-
version.notes_type = HockeyApp::Version::NOTES_TYPES_TO_SYM.invert[self.notes_type]
|
93
|
-
version.notify = HockeyApp::Version::NOTIFY_TO_BOOL.invert[self.notify]
|
94
|
-
version.status = HockeyApp::Version::STATUS_TO_SYM.invert[self.status]
|
95
|
-
version.tags = self.tags
|
96
|
-
version
|
97
|
-
end
|
98
|
-
|
99
|
-
private
|
100
|
-
def config_client
|
101
|
-
HockeyApp::Config.configure do |config|
|
102
|
-
config.token = api_token
|
103
|
-
end
|
104
|
-
end
|
105
|
-
|
106
|
-
def string_or_num_to_bool(object)
|
107
|
-
if object.is_a?(Symbol)
|
108
|
-
notify = notify.to_s
|
109
|
-
end
|
110
|
-
if object.is_a?(String)
|
111
|
-
object = (object == "true") ? true : false
|
112
|
-
end
|
113
|
-
if object.is_a?(Numeric)
|
114
|
-
object = HockeyApp::Version::NOTIFY_TO_BOOL[object]
|
115
|
-
end
|
116
|
-
object
|
117
|
-
end
|
118
|
-
end
|
119
|
-
|
120
32
|
module Motion; module Project; class Config
|
121
33
|
|
122
34
|
attr_accessor :hockeyapp_mode
|
@@ -170,7 +82,7 @@ namespace 'hockeyapp' do
|
|
170
82
|
|
171
83
|
# This is an HockeyApp::Version object
|
172
84
|
@hockey_version = prefs.make_version
|
173
|
-
@hockey_version.ipa =
|
85
|
+
@hockey_version.ipa = File.new(App.config.archive, 'r')
|
174
86
|
@hockey_version.dsym = File.new(app_dsym_zip, 'r')
|
175
87
|
|
176
88
|
App.info "Upload", "#{@hockey_version.inspect}"
|
data/lib/motion-hockeyrink.rb
CHANGED
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: motion-hockeyrink
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Clay Allsopp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: hockeyapp
|
14
|
+
name: hockeyapp-config
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ! '>='
|