ios_analytics 0.0.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 +7 -0
- data/.gitignore +11 -0
- data/.rspec +2 -0
- data/.travis.yml +4 -0
- data/Gemfile +4 -0
- data/README.md +36 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/exe/ios_analytics +6 -0
- data/ios_analytics.gemspec +29 -0
- data/lib/ios_analytics/cli.rb +26 -0
- data/lib/ios_analytics/translate.rb +29 -0
- data/lib/ios_analytics/version.rb +3 -0
- data/lib/ios_analytics.rb +5 -0
- metadata +143 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 61a8b6b0a79c85e4373afa32ddc6ed3661acc993
|
4
|
+
data.tar.gz: 32baf2dbb2bf9881d9f705e5a43c6d952824feca
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1c48f09f046cb184f6c0abf50a7bb58e121e018e906c1fedb7b62c9d0a100055221f95c0310f0012be7654a1b2bc3a1fe529bf48fdce748f97b908cf3abde286
|
7
|
+
data.tar.gz: bbf2d6a07636a717e68c1896d492ab84ef2cba86e29a79977e6b8a340ff2b6daf9356173c977787b262c4d912d3c6d32ff19aefc35ea5a693721c06ca586a172
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# iOS Analytics
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/ios_analytics`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'ios_analytics'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install ios_analytics
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake rspec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/ios_analytics.
|
36
|
+
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "ios_analytics"
|
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
|
data/bin/setup
ADDED
data/exe/ios_analytics
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'ios_analytics/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'ios_analytics'
|
8
|
+
spec.version = IosAnalytics::VERSION
|
9
|
+
spec.authors = ['noboru-i']
|
10
|
+
spec.email = ['ishikura.noboru@gmail.com']
|
11
|
+
|
12
|
+
spec.summary = 'Translate plist format into checkstyle format.'
|
13
|
+
spec.description = 'Translate plist format into checkstyle format.'
|
14
|
+
spec.homepage = 'https://github.com/noboru-i/findbugs_translate_checkstyle_format'
|
15
|
+
spec.license = 'MIT'
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
+
spec.bindir = 'exe'
|
19
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
|
+
spec.require_paths = ['lib']
|
21
|
+
|
22
|
+
spec.add_runtime_dependency 'thor'
|
23
|
+
spec.add_runtime_dependency 'plist'
|
24
|
+
|
25
|
+
spec.add_development_dependency 'bundler', '~> 1.10'
|
26
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
27
|
+
spec.add_development_dependency 'rspec'
|
28
|
+
spec.add_development_dependency 'coveralls'
|
29
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'thor'
|
2
|
+
|
3
|
+
module IosAnalytics
|
4
|
+
class CLI < Thor
|
5
|
+
include ::IosAnalytics::Translate
|
6
|
+
desc 'translate', 'Exec Translate'
|
7
|
+
option :data
|
8
|
+
option :file
|
9
|
+
# path = '/Users/ishikuranoboru/.ghq/github.com/noboru-i/kyouen-ios/derivedData/Build/Intermediates/TumeKyouen.build/**/StaticAnalyzer/**/*.plist'
|
10
|
+
option :derivedData, default: '/Users/ishikuranoboru/.ghq/github.com/noboru-i/ios_analytics/samples/*.plist'
|
11
|
+
def translate
|
12
|
+
doc = REXML::Document.new
|
13
|
+
doc << REXML::XMLDecl.new('1.0', 'UTF-8')
|
14
|
+
|
15
|
+
checkstyle = doc.add_element('checkstyle')
|
16
|
+
|
17
|
+
path = options[:derivedData]
|
18
|
+
Dir.glob(path).each do |plist_file|
|
19
|
+
trans(checkstyle, plist_file)
|
20
|
+
end
|
21
|
+
|
22
|
+
formatter = REXML::Formatters::Pretty.new(4)
|
23
|
+
formatter.write(doc, STDOUT)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'plist'
|
2
|
+
require 'rexml/document'
|
3
|
+
|
4
|
+
module IosAnalytics
|
5
|
+
module Translate
|
6
|
+
def trans(checkstyle_dom, plist_file)
|
7
|
+
result = Plist::parse_xml(plist_file)
|
8
|
+
return nil if result['files'].empty?
|
9
|
+
|
10
|
+
file_path = result['files'][0]
|
11
|
+
result['diagnostics'].each do |diagnostics|
|
12
|
+
create_element(checkstyle_dom, file_path, diagnostics)
|
13
|
+
end
|
14
|
+
|
15
|
+
checkstyle_dom
|
16
|
+
end
|
17
|
+
|
18
|
+
def create_element(checkstyle_dom, file_path, diagnostics)
|
19
|
+
file = checkstyle_dom.add_element('file',
|
20
|
+
'name' => file_path
|
21
|
+
)
|
22
|
+
file.add_element('error',
|
23
|
+
'line' => diagnostics['location']['line'],
|
24
|
+
'severity' => 'error',
|
25
|
+
'message' => "#{diagnostics['category']}\n#{diagnostics['description']}"
|
26
|
+
)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
metadata
ADDED
@@ -0,0 +1,143 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ios_analytics
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- noboru-i
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-09-03 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: thor
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: plist
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.10'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.10'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '10.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '10.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: coveralls
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
description: Translate plist format into checkstyle format.
|
98
|
+
email:
|
99
|
+
- ishikura.noboru@gmail.com
|
100
|
+
executables:
|
101
|
+
- ios_analytics
|
102
|
+
extensions: []
|
103
|
+
extra_rdoc_files: []
|
104
|
+
files:
|
105
|
+
- ".gitignore"
|
106
|
+
- ".rspec"
|
107
|
+
- ".travis.yml"
|
108
|
+
- Gemfile
|
109
|
+
- README.md
|
110
|
+
- Rakefile
|
111
|
+
- bin/console
|
112
|
+
- bin/setup
|
113
|
+
- exe/ios_analytics
|
114
|
+
- ios_analytics.gemspec
|
115
|
+
- lib/ios_analytics.rb
|
116
|
+
- lib/ios_analytics/cli.rb
|
117
|
+
- lib/ios_analytics/translate.rb
|
118
|
+
- lib/ios_analytics/version.rb
|
119
|
+
homepage: https://github.com/noboru-i/findbugs_translate_checkstyle_format
|
120
|
+
licenses:
|
121
|
+
- MIT
|
122
|
+
metadata: {}
|
123
|
+
post_install_message:
|
124
|
+
rdoc_options: []
|
125
|
+
require_paths:
|
126
|
+
- lib
|
127
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
133
|
+
requirements:
|
134
|
+
- - ">="
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: '0'
|
137
|
+
requirements: []
|
138
|
+
rubyforge_project:
|
139
|
+
rubygems_version: 2.4.5
|
140
|
+
signing_key:
|
141
|
+
specification_version: 4
|
142
|
+
summary: Translate plist format into checkstyle format.
|
143
|
+
test_files: []
|