crittercism 0.1.0 → 0.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d03ea2120220de474ede3427e2bbd72864f73ca5
4
- data.tar.gz: a18c1ebbe0517f4aab551bbbddbd3bcb1a7ec765
3
+ metadata.gz: 930a2e36b9e1c6ce6e292ba4a7c6455610175837
4
+ data.tar.gz: cf51892f16f07f0a8f6c6c4b09dd6fbfbab438be
5
5
  SHA512:
6
- metadata.gz: 7f79b8b10611d0550b48f064a8cc4d8c3e15ad8aca8cd7ae44823f0537a4c43fa23628a6b1a7b6d7105b169234ea1c6614d434973e63878011286c73a0c54c71
7
- data.tar.gz: 9bbc99f4b26ed3a0764a80c9a02c0a73c2887403a947baa0d9016868965b849b4f782a1e17187cd428cb8c6dd54bb35d51473ede8af38565aa984f6d00b862db
6
+ metadata.gz: da198ef9ac20ea6a4f790eb306da8ee16f5bca7ab620e15bea32c4197a2dae1ff4e1167b79cae277cc8a0c8d87967b35985e4f69853498c8142cf42f7f68505d
7
+ data.tar.gz: d74721cdaedeb6780404998ff367fa8d8e386e564ff53db4b286b83f2a38d3113e45a8b1573f40a7a743a04af7900a261f26e31022698a558f3fd960475a31cc
data/crittercism.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "crittercism"
5
- spec.version = "0.1.0"
5
+ spec.version = "0.1.1"
6
6
  spec.authors = ["Andrew Havens"]
7
7
  spec.email = ["email@andrewhavens.com"]
8
8
 
@@ -24,30 +24,21 @@ namespace :crittercism do
24
24
 
25
25
  desc 'Submit .dSYM to Crittercism'
26
26
  task :upload_dsym => :zip_dsym do
27
- require 'net/http'
28
- require 'net/http/post/multipart'
29
-
30
27
  puts 'Submitting dSYM to Crittercism...'
31
28
 
32
29
  upload_uri = "https://api.crittercism.com/api_beta/dsym/#{App.config.crittercism_app_id}"
33
- uri = URI.parse(upload_uri)
34
- http = Net::HTTP.new(uri.host, uri.port)
35
- http.use_ssl = true
36
-
37
- request = Net::HTTP::Post::Multipart.new(uri.path,
38
- 'dsym' => UploadIO.new("#{app_dsym}.zip", 'application/zip', 'dsym.zip'),
39
- 'key' => App.config.crittercism_api_key
40
- )
41
- response = http.request(request)
42
-
43
- puts "Crittercism Response: #{response.code} #{response.message}"
44
- p response.body unless /^2\d+/.match("#{response.code}")
45
-
46
- # TODO: use simple curl command once I can figure out how to display a helpful response
47
- # curl = "/usr/bin/curl #{upload_uri} "\
48
- # '--silent --output /dev/null '\
49
- # "-F dsym=@'#{app_dsym}.zip' "\
50
- # "-F key='#{App.config.crittercism_api_key}' "
51
- # sh curl
30
+ command = "/usr/bin/curl #{upload_uri}"\
31
+ " --silent --output /dev/null -w '%{http_code}'"\
32
+ " -F dsym=@'#{app_dsym}.zip'"\
33
+ " -F key='#{App.config.crittercism_api_key}'"
34
+
35
+ output = %x[#{command}]
36
+ if output =~ /^2\d+/
37
+ puts 'Successfully uploaded dSYM to Crittercism.'
38
+ else
39
+ puts 'Failed to upload dSYM to Crittercism.'
40
+ p output
41
+ exit 1
42
+ end
52
43
  end
53
44
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crittercism
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Havens