crep 0.1.0
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 +7 -0
- data/.gitignore +60 -0
- data/.rspec +2 -0
- data/.rubocop.yml +17 -0
- data/Changelog.md +21 -0
- data/Gemfile +7 -0
- data/LICENSE +21 -0
- data/README.md +37 -0
- data/Rakefile +2 -0
- data/Vision.md +15 -0
- data/bin/console +14 -0
- data/bin/crep +7 -0
- data/bin/setup +8 -0
- data/crep.gemspec +36 -0
- data/lib/crep.rb +13 -0
- data/lib/crep/command.rb +15 -0
- data/lib/crep/command/crashes.rb +43 -0
- data/lib/crep/crash_controller.rb +64 -0
- data/lib/crep/model/crash_model/app.rb +11 -0
- data/lib/crep/model/crash_model/crash.rb +14 -0
- data/lib/crep/model/crash_sources/crash_source.rb +19 -0
- data/lib/crep/model/crash_sources/hockeyapp_crash_source.rb +77 -0
- data/lib/crep/version.rb +3 -0
- metadata +183 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 6ec9983a55f99437b47855a38a35de0748a1fb8023dca8ef5f3f973b9be87919
|
4
|
+
data.tar.gz: e3830e5d8609c2aa9d1808d4d82218d7a44172b207f3fde619462c1cd38adddd
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b3b1687053ac8aae4f85872331f9e16e632769765d6ca598556dd2adc76d048e68cafbe4fa0c2c0a205f0307d702c9196e73221ce9b5e3e214df24af39f3e7b0
|
7
|
+
data.tar.gz: 1d0ea2b9eee605d398f8e600a2bbd31698f8e44ade452862cdccfb856f96013ef8dde8454de33ee23d8d330fdb710ca0ecd79945bec282bcbdbb9fa7b7a1995c
|
data/.gitignore
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.bundle/
|
4
|
+
/.yardoc
|
5
|
+
/Gemfile.lock
|
6
|
+
/.config
|
7
|
+
/_yardoc/
|
8
|
+
/coverage/
|
9
|
+
/InstalledFiles
|
10
|
+
/doc/
|
11
|
+
/pkg/
|
12
|
+
/spec/reports/
|
13
|
+
/spec/examples.txt
|
14
|
+
/test/tmp/
|
15
|
+
/test/version_tmp/
|
16
|
+
/tmp/
|
17
|
+
|
18
|
+
# Used by dotenv library to load environment variables.
|
19
|
+
# .env
|
20
|
+
|
21
|
+
## Specific to RubyMotion:
|
22
|
+
.dat*
|
23
|
+
.repl_history
|
24
|
+
build/
|
25
|
+
*.bridgesupport
|
26
|
+
build-iPhoneOS/
|
27
|
+
build-iPhoneSimulator/
|
28
|
+
|
29
|
+
# rspec failure tracking
|
30
|
+
.rspec_status
|
31
|
+
|
32
|
+
## Specific to RubyMotion (use of CocoaPods):
|
33
|
+
#
|
34
|
+
# We recommend against adding the Pods directory to your .gitignore. However
|
35
|
+
# you should judge for yourself, the pros and cons are mentioned at:
|
36
|
+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
37
|
+
#
|
38
|
+
# vendor/Pods/
|
39
|
+
|
40
|
+
## Documentation cache and generated files:
|
41
|
+
/.yardoc/
|
42
|
+
/_yardoc/
|
43
|
+
/doc/
|
44
|
+
/rdoc/
|
45
|
+
|
46
|
+
## Environment normalization:
|
47
|
+
/.bundle/
|
48
|
+
/vendor/bundle
|
49
|
+
/lib/bundler/man/
|
50
|
+
|
51
|
+
# for a library or gem, you might want to ignore these files since the code is
|
52
|
+
# intended to run in multiple environments; otherwise, check them in:
|
53
|
+
# Gemfile.lock
|
54
|
+
# .ruby-version
|
55
|
+
# .ruby-gemset
|
56
|
+
|
57
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
58
|
+
.rvmrc
|
59
|
+
|
60
|
+
.DS_Store
|
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2017-12-09 23:28:51 +0100 using RuboCop version 0.51.0.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
Metrics/LineLength:
|
10
|
+
Enabled: false
|
11
|
+
|
12
|
+
Metrics/ParameterLists:
|
13
|
+
Enabled: false
|
14
|
+
|
15
|
+
Style/Documentation:
|
16
|
+
Enabled: false
|
17
|
+
|
data/Changelog.md
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2017 XING SE
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
# Crep
|
2
|
+
|
3
|
+
*Crep - a Crash Reporter for creating appealing Crash Newsletters*
|
4
|
+
|
5
|
+
We use Crep at [XING](https://www.xing.com) to create our Crash Newsletters for [iOS](https://www.xing.com/ios) and [Android](https://www.xing.com/android) within the _Mobile Releases Team_. It currently uses [HockeyApp](https://rink.hockeyapp.net) as a crash source, so if you are using Hockey, you should definitely give Crep a try.
|
6
|
+
|
7
|
+
In case you are creating Crash Newsletters and have a different crash source in mind - check out the contributing section!
|
8
|
+
|
9
|
+
## Install
|
10
|
+
|
11
|
+
Please follow our guide in the [Installation Instructions](https://github.com/xing/crep/wiki/Install).
|
12
|
+
|
13
|
+
## Usage
|
14
|
+
|
15
|
+
Provide a `CREP_HOCKEY_API_TOKEN`:
|
16
|
+
|
17
|
+
`export CREP_HOCKEY_API_TOKEN='abcde'`
|
18
|
+
|
19
|
+
Run Crep:
|
20
|
+
|
21
|
+
`bundle exec crep crashes --identifier='com.example.company' --version='1.23.0' --build='42' --only-unresolved`
|
22
|
+
|
23
|
+
The `--only-unresolved` flag filters out any crashes marked as resolved.
|
24
|
+
|
25
|
+
## Test
|
26
|
+
|
27
|
+
Run `bundle exec rspec` in order to run the tests.
|
28
|
+
|
29
|
+
## Contributing
|
30
|
+
|
31
|
+
🎁 Bug reports and pull requests for new features are most welcome!
|
32
|
+
|
33
|
+
👷🏼 In case you want to use a different crash source - feel free to add on, we are looking forward to your pull request, we'd love to help!
|
34
|
+
|
35
|
+
## License
|
36
|
+
|
37
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/Vision.md
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
# Goals
|
2
|
+
|
3
|
+
- Add newsletter templating to easily create a readable and actionable format for sharing crashes.
|
4
|
+
- Add multiple crash sources, making it easier for anyone to plug and play.
|
5
|
+
- Enable newsletters or results to be easily published on sites like GitHub.
|
6
|
+
- Cultivate an inclusive open source community through respectful discussion.
|
7
|
+
|
8
|
+
# Scope
|
9
|
+
|
10
|
+
- We are focusing on crashes for a specific app version.
|
11
|
+
- Having a crash newsletter in mind, we do not expect adding crash visualisations.
|
12
|
+
|
13
|
+
## Inspiration
|
14
|
+
|
15
|
+
This project is inspired by our effort to share crash insights and cultivate teams to feel repsonsibility to fix them at [XING](https://www.xing.com) and aims to raise awareness and fix crashes across all teams.
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'bundler/setup'
|
4
|
+
require 'crep'
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require 'irb'
|
14
|
+
IRB.start(__FILE__)
|
data/bin/crep
ADDED
data/bin/setup
ADDED
data/crep.gemspec
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'crep/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'crep'
|
8
|
+
spec.version = Crep::VERSION
|
9
|
+
spec.authors = ['Kim Dung-Pham', 'Bas Broek', 'Serghei Moret']
|
10
|
+
spec.email = ['kim.dung-pham@xing.com', 'bas.broek@xing.com', 'serghei.moret@xing.com']
|
11
|
+
|
12
|
+
spec.summary = 'Create Crash Newsletter with ease.'
|
13
|
+
spec.description = 'Create Crash Newsletter with ease. Really.'
|
14
|
+
spec.homepage = 'https://github.com/xing/crep'
|
15
|
+
spec.license = 'MIT'
|
16
|
+
|
17
|
+
|
18
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
19
|
+
f.match(%r{^(test|spec|features)/})
|
20
|
+
end
|
21
|
+
spec.bindir = 'bin'
|
22
|
+
# spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
|
+
spec.executables << 'crep'
|
24
|
+
spec.require_paths = ['lib']
|
25
|
+
|
26
|
+
spec.add_dependency 'hockeyapp'
|
27
|
+
spec.add_dependency 'colorize'
|
28
|
+
|
29
|
+
spec.add_runtime_dependency 'claide', '~> 1.0.0'
|
30
|
+
|
31
|
+
spec.add_development_dependency 'bundler', '~> 1.15'
|
32
|
+
spec.add_development_dependency 'pry'
|
33
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
34
|
+
spec.add_development_dependency 'rspec'
|
35
|
+
spec.add_development_dependency 'rubocop', '0.51.0'
|
36
|
+
end
|
data/lib/crep.rb
ADDED
data/lib/crep/command.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'claide'
|
2
|
+
require 'crep/version'
|
3
|
+
|
4
|
+
module Crep
|
5
|
+
class Command < CLAide::Command
|
6
|
+
require 'crep/command/crashes'
|
7
|
+
|
8
|
+
self.abstract_command = true
|
9
|
+
self.command = 'crep'
|
10
|
+
self.version = Crep::VERSION
|
11
|
+
self.description = <<-DESC
|
12
|
+
Crep is a crash reporter
|
13
|
+
DESC
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require 'crep/command'
|
2
|
+
require 'crep/crash_controller'
|
3
|
+
require 'crep/model/crash_sources/hockeyapp_crash_source'
|
4
|
+
require 'hockeyapp'
|
5
|
+
|
6
|
+
module Crep
|
7
|
+
class Crashes < Command
|
8
|
+
DEFAULT_TOP_COUNT = 5
|
9
|
+
|
10
|
+
def self.options
|
11
|
+
[
|
12
|
+
['--top=5', "If set, Crep will show the top x crashes. #{DEFAULT_TOP_COUNT} by default."],
|
13
|
+
['--identifier=<com.company.app>', 'Crep will show crashes for the app with this bundle identifier'],
|
14
|
+
['--version=<7.10.0>', 'The version of the App.'],
|
15
|
+
['--build=<24>', 'The Build number of the App.'],
|
16
|
+
['--only-unresolved', 'If set, resolved crashes will be filtered out.']
|
17
|
+
].concat(super)
|
18
|
+
end
|
19
|
+
|
20
|
+
self.summary = <<-DESC
|
21
|
+
Shows a list of crashes
|
22
|
+
DESC
|
23
|
+
|
24
|
+
self.description = <<-DESC
|
25
|
+
Besides the optional `top` parameter, Crep requires all other parameters.
|
26
|
+
DESC
|
27
|
+
|
28
|
+
def initialize(argv)
|
29
|
+
@show_only_unresolved = argv.flag?('only-unresolved', false)
|
30
|
+
@top = argv.option('top') || DEFAULT_TOP_COUNT
|
31
|
+
@bundle_identifier = argv.option('identifier') || raise('Missing `identifier` parameter')
|
32
|
+
@version = argv.option('version') || raise('Missing `version` parameter')
|
33
|
+
@build = argv.option('build') || raise('Missing `build` parameter')
|
34
|
+
super
|
35
|
+
end
|
36
|
+
|
37
|
+
def run
|
38
|
+
crash_datasource = HockeyAppCrashSource.new
|
39
|
+
crash_controller = CrashController.new(@bundle_identifier, @top, crash_datasource, @show_only_unresolved)
|
40
|
+
crash_controller.top_crashes(@version, @build)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
require 'colorize'
|
2
|
+
|
3
|
+
module Crep
|
4
|
+
class CrashController
|
5
|
+
def initialize(bundle_identifier, top, crash_source, show_only_unresolved)
|
6
|
+
@bundle_identifier = bundle_identifier
|
7
|
+
@top = top
|
8
|
+
@crash_source = crash_source
|
9
|
+
@show_only_unresolved = show_only_unresolved
|
10
|
+
@crash_source.configure(bundle_identifier)
|
11
|
+
end
|
12
|
+
|
13
|
+
# returns list of top crashes for the given build
|
14
|
+
def top_crashes(version, build)
|
15
|
+
crashes = @crash_source.crashes(@top, version, build, @show_only_unresolved)
|
16
|
+
total_crashes = @crash_source.crash_count(version: version,
|
17
|
+
build: build)
|
18
|
+
report(crashes: crashes,
|
19
|
+
total_crashes: total_crashes,
|
20
|
+
app_name: @crash_source.app.name,
|
21
|
+
identifier: @crash_source.app.bundle_identifier,
|
22
|
+
version: version,
|
23
|
+
build: build)
|
24
|
+
end
|
25
|
+
|
26
|
+
def report(crashes:, total_crashes:, app_name:, identifier:, version:, build:)
|
27
|
+
puts("Reporting for #{app_name} (#{version}/#{build}) #{identifier}")
|
28
|
+
|
29
|
+
crash_reports = crashes_report(crashes: crashes, total_crashes: total_crashes, version: version)
|
30
|
+
empty_message = total_crashes == 0 ? "Look mom, no crashes... yet!" : "Look mom, no unresolved crashes... yet!"
|
31
|
+
puts(empty_message.green) if crash_reports.empty?
|
32
|
+
|
33
|
+
crash_reports.each_with_index do |crash_report, i|
|
34
|
+
puts("\n------------- ##{(i + 1)} --------------")
|
35
|
+
crash_report.each do |line|
|
36
|
+
puts(line)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def crashes_report(crashes:, total_crashes:, version:)
|
42
|
+
crashes.map do |crash|
|
43
|
+
percentage = crash_percentage(crash: crash, total_crashes: total_crashes)
|
44
|
+
crash_report(crash: crash, percentage: percentage, version: version)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
def crash_percentage(crash:, total_crashes:)
|
49
|
+
crash.occurrences.to_f / total_crashes.to_f * 100.0
|
50
|
+
end
|
51
|
+
|
52
|
+
def crash_report(crash:, percentage:, version:)
|
53
|
+
raise 'Crash info does not fulfill the requirements' unless crash.is_a? Crep::Crash
|
54
|
+
report = []
|
55
|
+
report.push "Class: #{crash.crash_class}"
|
56
|
+
report.push "First appeared on #{crash.registered_at} and occurred #{crash.occurrences} times in #{version}"
|
57
|
+
report.push "Percentage: #{percentage.round(2)}% of all #{version} crashes"
|
58
|
+
report.push "File/Line: #{crash.file_line}"
|
59
|
+
report.push "Reason: #{crash.reason}" # crash.reason[0..80]
|
60
|
+
report.push "Link: #{crash.url}"
|
61
|
+
report
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Crep
|
2
|
+
class Crash
|
3
|
+
attr_reader :file_line, :occurrences, :reason, :crash_class, :registered_at, :url
|
4
|
+
|
5
|
+
def initialize(file_line:, occurrences:, reason:, crash_class:, registered_at:, url:)
|
6
|
+
@file_line = file_line
|
7
|
+
@occurrences = occurrences
|
8
|
+
@reason = reason
|
9
|
+
@crash_class = crash_class
|
10
|
+
@registered_at = registered_at
|
11
|
+
@url = url
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Crep
|
2
|
+
# This is an abstract class that defines the methods which subclasses must implement.
|
3
|
+
class CrashSource
|
4
|
+
attr_reader :app
|
5
|
+
|
6
|
+
# Necessary configuration of the subclass can happen here
|
7
|
+
def configure(_bundle_identifier)
|
8
|
+
raise 'CrashSource subclass has to implement the `configure` method.'
|
9
|
+
end
|
10
|
+
|
11
|
+
def crash_count(_version, _build)
|
12
|
+
raise 'CrashSource subclass has to implement the `crash_count` method.'
|
13
|
+
end
|
14
|
+
|
15
|
+
def crashes(_top, _version, _build, _show_only_unresolved)
|
16
|
+
raise 'CrashSource subclass has to implement the `crashes` method.'
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
require 'crep/model/crash_sources/crash_source'
|
2
|
+
require 'crep/model/crash_model/app'
|
3
|
+
require 'crep/model/crash_model/crash'
|
4
|
+
require 'hockeyapp'
|
5
|
+
|
6
|
+
module Crep
|
7
|
+
# The HockeyApp Crash Source
|
8
|
+
class HockeyAppCrashSource < CrashSource
|
9
|
+
def configure(bundle_identifier)
|
10
|
+
HockeyApp::Config.configure do |config|
|
11
|
+
raise 'Missing API token (CREP_HOCKEY_API_TOKEN)' unless ENV['CREP_HOCKEY_API_TOKEN']
|
12
|
+
config.token = ENV['CREP_HOCKEY_API_TOKEN']
|
13
|
+
end
|
14
|
+
|
15
|
+
@client = HockeyApp.build_client
|
16
|
+
@hockeyapp_app = hockeyapp(bundle_identifier, @client)
|
17
|
+
@app = App.new(@hockeyapp_app.title, bundle_identifier)
|
18
|
+
end
|
19
|
+
|
20
|
+
def crashes(top, version, build, show_only_unresolved)
|
21
|
+
version = version(version: version, build: build)
|
22
|
+
crash_groups(version, show_only_unresolved).take(top.to_i)
|
23
|
+
end
|
24
|
+
|
25
|
+
def crash_count(version:, build:)
|
26
|
+
statistics = @client.get_statistics @hockeyapp_app
|
27
|
+
statistics_filtered_by_version = statistics.select do |statistic|
|
28
|
+
statistic.shortversion == version && statistic.version == build
|
29
|
+
end
|
30
|
+
statistics_filtered_by_version.first.crashes
|
31
|
+
end
|
32
|
+
|
33
|
+
def crash_groups(version, show_only_unresolved)
|
34
|
+
reasons = version.crash_reasons('sort' => 'number_of_crashes', 'order' => 'desc')
|
35
|
+
unresolved_reasons = show_only_unresolved ? unresolved_reasons(reasons) : reasons
|
36
|
+
unresolved_reasons.map do |reason|
|
37
|
+
url = url(app_id: reason.app.public_identifier, version_id: version.id, reason_id: reason.id)
|
38
|
+
Crash.new(file_line: "#{reason.file}:#{reason.line}",
|
39
|
+
occurrences: reason.number_of_crashes,
|
40
|
+
reason: reason.reason,
|
41
|
+
crash_class: reason.crash_class,
|
42
|
+
registered_at: Date.parse(reason.created_at),
|
43
|
+
url: url)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
def url(app_id:, version_id:, reason_id:)
|
48
|
+
"https://rink.hockeyapp.net/manage/apps/#{app_id}/app_versions/#{version_id}/crash_reasons/#{reason_id}"
|
49
|
+
end
|
50
|
+
|
51
|
+
def version(version:, build:)
|
52
|
+
filtered_versions = filtered_versions_by_version_and_build(@hockeyapp_app.versions, version, build)
|
53
|
+
|
54
|
+
raise "No version was found for #{version})#{build})" unless filtered_versions.count > 0
|
55
|
+
|
56
|
+
filtered_versions.first
|
57
|
+
end
|
58
|
+
|
59
|
+
def unresolved_reasons(reasons)
|
60
|
+
reasons.reject(&:fixed)
|
61
|
+
end
|
62
|
+
|
63
|
+
def hockeyapp(bundle_identifier, client)
|
64
|
+
all_apps = client.get_apps
|
65
|
+
apps = all_apps.select do |app|
|
66
|
+
app.bundle_identifier == bundle_identifier
|
67
|
+
end
|
68
|
+
apps.first
|
69
|
+
end
|
70
|
+
|
71
|
+
def filtered_versions_by_version_and_build(versions, version_filter, build_filter)
|
72
|
+
versions.select do |version|
|
73
|
+
(version.shortversion == version_filter) && (version.version == build_filter)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
data/lib/crep/version.rb
ADDED
metadata
ADDED
@@ -0,0 +1,183 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: crep
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Kim Dung-Pham
|
8
|
+
- Bas Broek
|
9
|
+
- Serghei Moret
|
10
|
+
autorequire:
|
11
|
+
bindir: bin
|
12
|
+
cert_chain: []
|
13
|
+
date: 2018-01-13 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: hockeyapp
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
|
+
requirements:
|
19
|
+
- - ">="
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
version: '0'
|
29
|
+
- !ruby/object:Gem::Dependency
|
30
|
+
name: colorize
|
31
|
+
requirement: !ruby/object:Gem::Requirement
|
32
|
+
requirements:
|
33
|
+
- - ">="
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: '0'
|
36
|
+
type: :runtime
|
37
|
+
prerelease: false
|
38
|
+
version_requirements: !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '0'
|
43
|
+
- !ruby/object:Gem::Dependency
|
44
|
+
name: claide
|
45
|
+
requirement: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - "~>"
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: 1.0.0
|
50
|
+
type: :runtime
|
51
|
+
prerelease: false
|
52
|
+
version_requirements: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - "~>"
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: 1.0.0
|
57
|
+
- !ruby/object:Gem::Dependency
|
58
|
+
name: bundler
|
59
|
+
requirement: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - "~>"
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '1.15'
|
64
|
+
type: :development
|
65
|
+
prerelease: false
|
66
|
+
version_requirements: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - "~>"
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '1.15'
|
71
|
+
- !ruby/object:Gem::Dependency
|
72
|
+
name: pry
|
73
|
+
requirement: !ruby/object:Gem::Requirement
|
74
|
+
requirements:
|
75
|
+
- - ">="
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
type: :development
|
79
|
+
prerelease: false
|
80
|
+
version_requirements: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: '0'
|
85
|
+
- !ruby/object:Gem::Dependency
|
86
|
+
name: rake
|
87
|
+
requirement: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - "~>"
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '10.0'
|
92
|
+
type: :development
|
93
|
+
prerelease: false
|
94
|
+
version_requirements: !ruby/object:Gem::Requirement
|
95
|
+
requirements:
|
96
|
+
- - "~>"
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: '10.0'
|
99
|
+
- !ruby/object:Gem::Dependency
|
100
|
+
name: rspec
|
101
|
+
requirement: !ruby/object:Gem::Requirement
|
102
|
+
requirements:
|
103
|
+
- - ">="
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: '0'
|
106
|
+
type: :development
|
107
|
+
prerelease: false
|
108
|
+
version_requirements: !ruby/object:Gem::Requirement
|
109
|
+
requirements:
|
110
|
+
- - ">="
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '0'
|
113
|
+
- !ruby/object:Gem::Dependency
|
114
|
+
name: rubocop
|
115
|
+
requirement: !ruby/object:Gem::Requirement
|
116
|
+
requirements:
|
117
|
+
- - '='
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: 0.51.0
|
120
|
+
type: :development
|
121
|
+
prerelease: false
|
122
|
+
version_requirements: !ruby/object:Gem::Requirement
|
123
|
+
requirements:
|
124
|
+
- - '='
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: 0.51.0
|
127
|
+
description: Create Crash Newsletter with ease. Really.
|
128
|
+
email:
|
129
|
+
- kim.dung-pham@xing.com
|
130
|
+
- bas.broek@xing.com
|
131
|
+
- serghei.moret@xing.com
|
132
|
+
executables:
|
133
|
+
- crep
|
134
|
+
extensions: []
|
135
|
+
extra_rdoc_files: []
|
136
|
+
files:
|
137
|
+
- ".gitignore"
|
138
|
+
- ".rspec"
|
139
|
+
- ".rubocop.yml"
|
140
|
+
- Changelog.md
|
141
|
+
- Gemfile
|
142
|
+
- LICENSE
|
143
|
+
- README.md
|
144
|
+
- Rakefile
|
145
|
+
- Vision.md
|
146
|
+
- bin/console
|
147
|
+
- bin/crep
|
148
|
+
- bin/setup
|
149
|
+
- crep.gemspec
|
150
|
+
- lib/crep.rb
|
151
|
+
- lib/crep/command.rb
|
152
|
+
- lib/crep/command/crashes.rb
|
153
|
+
- lib/crep/crash_controller.rb
|
154
|
+
- lib/crep/model/crash_model/app.rb
|
155
|
+
- lib/crep/model/crash_model/crash.rb
|
156
|
+
- lib/crep/model/crash_sources/crash_source.rb
|
157
|
+
- lib/crep/model/crash_sources/hockeyapp_crash_source.rb
|
158
|
+
- lib/crep/version.rb
|
159
|
+
homepage: https://github.com/xing/crep
|
160
|
+
licenses:
|
161
|
+
- MIT
|
162
|
+
metadata: {}
|
163
|
+
post_install_message:
|
164
|
+
rdoc_options: []
|
165
|
+
require_paths:
|
166
|
+
- lib
|
167
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
168
|
+
requirements:
|
169
|
+
- - ">="
|
170
|
+
- !ruby/object:Gem::Version
|
171
|
+
version: '0'
|
172
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
173
|
+
requirements:
|
174
|
+
- - ">="
|
175
|
+
- !ruby/object:Gem::Version
|
176
|
+
version: '0'
|
177
|
+
requirements: []
|
178
|
+
rubyforge_project:
|
179
|
+
rubygems_version: 2.7.4
|
180
|
+
signing_key:
|
181
|
+
specification_version: 4
|
182
|
+
summary: Create Crash Newsletter with ease.
|
183
|
+
test_files: []
|