motion-deploygate 0.2.1 → 0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +35 -2
  3. data/lib/motion-deploygate.rb +12 -2
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4cef457d80b0371abefbf8019394969508a98ffb
4
- data.tar.gz: 922c351f4b2af96660905ee04f7d622f0eef9295
3
+ metadata.gz: e79001b2e3fc320879999637eb25a3c5b8917eb9
4
+ data.tar.gz: 92425c9ddbc2389e8fbee9530d602ba1b526d14c
5
5
  SHA512:
6
- metadata.gz: 69c453e127d9a31ff6c81376818f578a33be08c144a9a63ad96234382d2d94cbfe0a1b907f3183301553e90e02cf259536bb96176bd8482fa3937b33435e1c55
7
- data.tar.gz: 14e6f73eda5bf2c8d5bf6a9e11c439e11f75763a26d2bf390262cb1403ec018f45536865683a5d3f4a71646df2157870f8a6e85299c9fdf6023c5ebb7cd71cda
6
+ metadata.gz: ea6e6fc021865dd60e9b4415ceccdf82d89444199a211ace05311b197b62f4e3d7159ea1e1d30a34fcb5cbeeb09039e7330dcfe386cb62df14e40baf276051c0
7
+ data.tar.gz: e8c8a71962a022d765554db7d39a455e11e85f5ee4c218e16afb4a94a62789701d660df4a457de298a37cb3e773fa840f49e09e3230466ce6e5363d2a3dcde0a
data/README.md CHANGED
@@ -22,7 +22,7 @@ Or install it yourself as:
22
22
 
23
23
  2. Download the DeployGate SDK for iOS from https://deploygate.com/docs/ios_sdk and unpack it. Then, copy `DeployGateSDK.framework` into `vendor` directory of your RubyMotion project. Create the `vendor` directory if it does not exist.
24
24
 
25
- 3. Configure the DeployGate SDK in your `Rakefile`. Set up `user_id`, `api_key`, `user_infomation` and `sdk` variables as following.
25
+ 3. Configure the DeployGate SDK in your `Rakefile`. Set up `user_id`, `api_key` and `sdk` variables as following.
26
26
 
27
27
  ```ruby
28
28
  Motion::Project::App.setup do |app|
@@ -30,21 +30,54 @@ Motion::Project::App.setup do |app|
30
30
  app.development do
31
31
  app.deploygate.user_id = '<user_id>'
32
32
  app.deploygate.api_key = '<api_key>'
33
- app.deploygate.user_infomation = true # or false
34
33
  app.deploygate.sdk = 'vendor/DeployGateSDK.framework'
35
34
  end
36
35
  ...
37
36
  end
38
37
  ```
39
38
 
39
+ ### User authentication
40
+
41
+ If you would enable this feature, the testers can receive a notification when you will submit a new version to DeployGate.
42
+ Set up `user_infomation` and `url_scheme` variables to use the user authentication in your `Rakefile`.
43
+
44
+ ```ruby
45
+ Motion::Project::App.setup do |app|
46
+ ...
47
+ app.development do
48
+ app.deploygate.user_id = '<user_id>'
49
+ app.deploygate.api_key = '<api_key>'
50
+ app.deploygate.user_infomation = true
51
+ app.deploygate.url_scheme = "deploygate.XXXXXXXXXXXX"
52
+ app.deploygate.sdk = 'vendor/DeployGateSDK.framework'
53
+ end
54
+ ...
55
+ end
56
+ ```
57
+
58
+ Then, add `application:didFinishLaunchingWithOptions:` method in your `AppDelegate` like the following.
59
+
60
+ ```ruby
61
+ class AppDelegate
62
+ def application(application, openURL:url, sourceApplication:sourceApplication, annotation:annotation)
63
+ return DeployGateSDK.sharedInstance.handleOpenUrl(url, sourceApplication:sourceApplication, annotation:annotation)
64
+ end
65
+
66
+ ...
67
+ end
68
+ ```
69
+
40
70
  ## Usage
41
71
 
42
72
  ### Submit your app to DeployGate
43
73
 
44
74
  ```
45
75
  % rake deploygate:submit
76
+ % rake deploygate:submit message="test version"
46
77
  ```
47
78
 
79
+ The `message` parameter is optional, and its content will be used as the description of submission.
80
+
48
81
  ### Symbolicate a crashlog
49
82
 
50
83
  Download a crashlog from DeployGate then run the following command to symbolicate a crashlog.
@@ -24,6 +24,15 @@ class DeployGateConfig
24
24
  @user_infomation = bool
25
25
  end
26
26
 
27
+ def url_scheme=(scheme)
28
+ @config.info_plist['CFBundleURLTypes'] = [
29
+ {
30
+ 'CFBundleURLName' => @config.identifier,
31
+ 'CFBundleURLSchemes' => [scheme]
32
+ }
33
+ ]
34
+ end
35
+
27
36
  def sdk=(sdk)
28
37
  @sdk = sdk
29
38
  @config.vendor_project(
@@ -75,7 +84,7 @@ EOF
75
84
  new_data = new_data.join
76
85
  if data != new_data
77
86
  File.open(file, "w") do |io|
78
- io.write new_data
87
+ io.write new_data
79
88
  end
80
89
  end
81
90
  end
@@ -100,7 +109,8 @@ namespace :deploygate do
100
109
  Rake::Task["archive"].invoke
101
110
  App.info "DeployGate", "Submit #{config.name}.ipa to DeployGate"
102
111
  app_path = "build/iPhoneOS-#{config.deployment_target}-Development/#{config.name}.ipa"
103
- sh "/usr/local/bin/dgate push #{config.deploygate.user_id} \"#{app_path}\""
112
+ message = ENV['message'] ? "-m \"#{ENV['message']}\"" : ""
113
+ sh "/usr/local/bin/dgate push #{config.deploygate.user_id} \"#{app_path}\" #{message}"
104
114
  end
105
115
 
106
116
  desc "Symbolicate a crash log"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-deploygate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: '0.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Watson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-24 00:00:00.000000000 Z
11
+ date: 2014-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake