qricker 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 5e20270ab3c574d96b8af91cada791cefbd2c407
4
+ data.tar.gz: 62d0adcbff3f7d3a07b75858a80ef84c4d511854
5
+ SHA512:
6
+ metadata.gz: 48b37d9e56517590f75f552bbbc75346e0e5570554474905e2579bf8203bf66d737401896cdea040085cfd01f784fba89a534d5853e6d611a689271d76df237b
7
+ data.tar.gz: 1075738230c24013aa8e5b9cd153e0d95e33dce1ae238609372b2fc8e2e644a588181f5854ad89bcfe63cf1ab343cb284255a89e33193b91cb9e07be74b1a8bf
data/.gitignore ADDED
@@ -0,0 +1,7 @@
1
+ .idea/.rakeTasks
2
+ .idea/misc.xml
3
+ .idea/modules.xml
4
+ .idea/qricker.iml
5
+ .idea/workspace.xml
6
+ pkg/
7
+ *.gem
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source 'https://rubygems.org'
2
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,119 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ qricker (0.0.1)
5
+ cocoapods (~> 1)
6
+ gli (= 2.16.0)
7
+ parseconfig (~> 1)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ CFPropertyList (2.3.5)
13
+ activesupport (4.2.8)
14
+ i18n (~> 0.7)
15
+ minitest (~> 5.1)
16
+ thread_safe (~> 0.3, >= 0.3.4)
17
+ tzinfo (~> 1.1)
18
+ aruba (0.14.2)
19
+ childprocess (~> 0.5.6)
20
+ contracts (~> 0.9)
21
+ cucumber (>= 1.3.19)
22
+ ffi (~> 1.9.10)
23
+ rspec-expectations (>= 2.99)
24
+ thor (~> 0.19)
25
+ builder (3.2.3)
26
+ childprocess (0.5.9)
27
+ ffi (~> 1.0, >= 1.0.11)
28
+ claide (1.0.1)
29
+ cocoapods (1.2.1)
30
+ activesupport (>= 4.0.2, < 5)
31
+ claide (>= 1.0.1, < 2.0)
32
+ cocoapods-core (= 1.2.1)
33
+ cocoapods-deintegrate (>= 1.0.1, < 2.0)
34
+ cocoapods-downloader (>= 1.1.3, < 2.0)
35
+ cocoapods-plugins (>= 1.0.0, < 2.0)
36
+ cocoapods-search (>= 1.0.0, < 2.0)
37
+ cocoapods-stats (>= 1.0.0, < 2.0)
38
+ cocoapods-trunk (>= 1.2.0, < 2.0)
39
+ cocoapods-try (>= 1.1.0, < 2.0)
40
+ colored2 (~> 3.1)
41
+ escape (~> 0.0.4)
42
+ fourflusher (~> 2.0.1)
43
+ gh_inspector (~> 1.0)
44
+ molinillo (~> 0.5.7)
45
+ nap (~> 1.0)
46
+ ruby-macho (~> 1.1)
47
+ xcodeproj (>= 1.4.4, < 2.0)
48
+ cocoapods-core (1.2.1)
49
+ activesupport (>= 4.0.2, < 5)
50
+ fuzzy_match (~> 2.0.4)
51
+ nap (~> 1.0)
52
+ cocoapods-deintegrate (1.0.1)
53
+ cocoapods-downloader (1.1.3)
54
+ cocoapods-plugins (1.0.0)
55
+ nap
56
+ cocoapods-search (1.0.0)
57
+ cocoapods-stats (1.0.0)
58
+ cocoapods-trunk (1.2.0)
59
+ nap (>= 0.8, < 2.0)
60
+ netrc (= 0.7.8)
61
+ cocoapods-try (1.1.0)
62
+ colored2 (3.1.2)
63
+ contracts (0.16.0)
64
+ cucumber (2.4.0)
65
+ builder (>= 2.1.2)
66
+ cucumber-core (~> 1.5.0)
67
+ cucumber-wire (~> 0.0.1)
68
+ diff-lcs (>= 1.1.3)
69
+ gherkin (~> 4.0)
70
+ multi_json (>= 1.7.5, < 2.0)
71
+ multi_test (>= 0.1.2)
72
+ cucumber-core (1.5.0)
73
+ gherkin (~> 4.0)
74
+ cucumber-wire (0.0.1)
75
+ diff-lcs (1.3)
76
+ escape (0.0.4)
77
+ ffi (1.9.18)
78
+ fourflusher (2.0.1)
79
+ fuzzy_match (2.0.4)
80
+ gh_inspector (1.0.3)
81
+ gherkin (4.1.3)
82
+ gli (2.16.0)
83
+ i18n (0.8.1)
84
+ minitest (5.10.1)
85
+ molinillo (0.5.7)
86
+ multi_json (1.12.1)
87
+ multi_test (0.1.2)
88
+ nanaimo (0.2.3)
89
+ nap (1.1.0)
90
+ netrc (0.7.8)
91
+ parseconfig (1.0.8)
92
+ rake (12.0.0)
93
+ rdoc (5.1.0)
94
+ rspec-expectations (3.6.0)
95
+ diff-lcs (>= 1.2.0, < 2.0)
96
+ rspec-support (~> 3.6.0)
97
+ rspec-support (3.6.0)
98
+ ruby-macho (1.1.0)
99
+ thor (0.19.4)
100
+ thread_safe (0.3.6)
101
+ tzinfo (1.2.3)
102
+ thread_safe (~> 0.1)
103
+ xcodeproj (1.4.4)
104
+ CFPropertyList (~> 2.3.3)
105
+ claide (>= 1.0.1, < 2.0)
106
+ colored2 (~> 3.1)
107
+ nanaimo (~> 0.2.3)
108
+
109
+ PLATFORMS
110
+ ruby
111
+
112
+ DEPENDENCIES
113
+ aruba
114
+ qricker!
115
+ rake
116
+ rdoc
117
+
118
+ BUNDLED WITH
119
+ 1.14.6
data/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # QRicker
2
+
3
+ > QCloud 工程化脚手架。支撑高质量高效率研发。
4
+
5
+
6
+ # Install
7
+
8
+ ```
9
+ gem build qricker.gemspec
10
+ gem install qricker-0.0.1.gem --http-proxy http://dev-proxy.oa.com:8080
11
+ ```
12
+
13
+ > 如果你要全局安装,请在命令之前加sudo
14
+
15
+
16
+ # Usage
17
+
18
+ ```
19
+ NAME
20
+ qricker - Describe your application here
21
+
22
+ SYNOPSIS
23
+ qricker [global options] command [command options] [arguments...]
24
+
25
+ VERSION
26
+ 0.0.1
27
+
28
+ GLOBAL OPTIONS
29
+ --help - Show this message
30
+ --version - Display the program version
31
+
32
+ COMMANDS
33
+ collect - collect all podspec file in special path
34
+ help - Shows a list of commands or help for one command
35
+ ```
data/README.rdoc ADDED
@@ -0,0 +1,6 @@
1
+ = qricker
2
+
3
+ Describe your project here
4
+
5
+ :include:qricker.rdoc
6
+
data/Rakefile ADDED
@@ -0,0 +1,44 @@
1
+ require 'rake/clean'
2
+ require 'rubygems'
3
+ require 'rubygems/package_task'
4
+ require 'rdoc/task'
5
+ require 'cucumber'
6
+ require 'cucumber/rake/task'
7
+ Rake::RDocTask.new do |rd|
8
+ rd.main = "README.rdoc"
9
+ rd.rdoc_files.include("README.rdoc","lib/**/*.rb","bin/**/*")
10
+ rd.title = 'Your application title'
11
+ end
12
+
13
+ spec = eval(File.read('qricker.gemspec'))
14
+
15
+ Gem::PackageTask.new(spec) do |pkg|
16
+ end
17
+ CUKE_RESULTS = 'results.html'
18
+ CLEAN << CUKE_RESULTS
19
+ desc 'Run features'
20
+ Cucumber::Rake::Task.new(:features) do |t|
21
+ opts = "features --format html -o #{CUKE_RESULTS} --format progress -x"
22
+ opts += " --tags #{ENV['TAGS']}" if ENV['TAGS']
23
+ t.cucumber_opts = opts
24
+ t.fork = false
25
+ end
26
+
27
+ desc 'Run features tagged as work-in-progress (@wip)'
28
+ Cucumber::Rake::Task.new('features:wip') do |t|
29
+ tag_opts = ' --tags ~@pending'
30
+ tag_opts = ' --tags @wip'
31
+ t.cucumber_opts = "features --format html -o #{CUKE_RESULTS} --format pretty -x -s#{tag_opts}"
32
+ t.fork = false
33
+ end
34
+
35
+ task :cucumber => :features
36
+ task 'cucumber:wip' => 'features:wip'
37
+ task :wip => 'features:wip'
38
+ require 'rake/testtask'
39
+ Rake::TestTask.new do |t|
40
+ t.libs << "test"
41
+ t.test_files = FileList['test/*_test.rb']
42
+ end
43
+
44
+ task :default => [:test,:features]
data/bin/qricker ADDED
@@ -0,0 +1,90 @@
1
+ #!/usr/bin/env ruby
2
+ require 'gli'
3
+ begin # XXX: Remove this begin/rescue before distributing your app
4
+ require 'qricker'
5
+ rescue LoadError
6
+ STDERR.puts "In development, you need to use `bundle exec bin/qricker` to run your app"
7
+ STDERR.puts "At install-time, RubyGems will make sure lib, etc. are in the load path"
8
+ STDERR.puts "Feel free to remove this message from bin/qricker now"
9
+ exit 64
10
+ end
11
+
12
+ include GLI::App
13
+
14
+ program_desc 'Describe your application here'
15
+
16
+ version Qricker::VERSION
17
+
18
+ subcommand_option_handling :normal
19
+ arguments :strict
20
+
21
+
22
+
23
+ desc 'collect all podspec file in special pathh'
24
+ command :collect do |c|
25
+
26
+ c.desc 'the root path to collect podspec files'
27
+ c.default_value '.'
28
+ c.flag :p
29
+
30
+ c.desc 'output path'
31
+ c.default_value "podspecs.rclt"
32
+ c.flag :o
33
+
34
+ c.action do |global_options,options,args|
35
+ podspecs = Qricker.allPodSpecs(options[:p])
36
+ output = ""
37
+ if not podspecs.nil?
38
+ puts "Find Podspecs:"
39
+ podspecs.each { |f|
40
+ puts "Name:#{f.name} Path:#{f.path}"
41
+ output += "[#{f.name}]\n"
42
+ output += "PATH=#{f.path}\n"
43
+ }
44
+ end
45
+ outputfile = options[:o]
46
+ File.open(outputfile, "w") { |f|
47
+ f.write output
48
+ }
49
+ end
50
+ end
51
+
52
+ desc "check the dependency in local specs"
53
+ command :dependency do |c|
54
+ c.desc 'the input podspecs.rclt'
55
+ c.flag [:i, "input-file"], :required=>true
56
+
57
+
58
+ c.desc "the spec name"
59
+ c.flag [:n, "spec-name"], :required=>true, :type=>Array
60
+
61
+ c.action do |global_options,options,args|
62
+ inputfile = options[:i]
63
+ specname = options[:n]
64
+ Qricker.dependency(inputfile, specname)
65
+ end
66
+
67
+ end
68
+
69
+ pre do |global,command,options,args|
70
+ # Pre logic here
71
+ # Return true to proceed; false to abort and not call the
72
+ # chosen command
73
+ # Use skips_pre before a command to skip this block
74
+ # on that command only
75
+ true
76
+ end
77
+
78
+ post do |global,command,options,args|
79
+ # Post logic here
80
+ # Use skips_post before a command to skip this
81
+ # block on that command only
82
+ end
83
+
84
+ on_error do |exception|
85
+ # Error logic here
86
+ # return false to skip default error handling
87
+ true
88
+ end
89
+
90
+ exit run(ARGV)
@@ -0,0 +1,8 @@
1
+ Feature: My bootstrapped app kinda works
2
+ In order to get going on coding my awesome app
3
+ I want to have aruba and cucumber setup
4
+ So I don't have to do it myself
5
+
6
+ Scenario: App just runs
7
+ When I get help for "qricker"
8
+ Then the exit status should be 0
@@ -0,0 +1,6 @@
1
+ When /^I get help for "([^"]*)"$/ do |app_name|
2
+ @app_name = app_name
3
+ step %(I run `#{app_name} help`)
4
+ end
5
+
6
+ # Add more step definitions here
@@ -0,0 +1,15 @@
1
+ require 'aruba/cucumber'
2
+
3
+ ENV['PATH'] = "#{File.expand_path(File.dirname(__FILE__) + '/../../bin')}#{File::PATH_SEPARATOR}#{ENV['PATH']}"
4
+ LIB_DIR = File.join(File.expand_path(File.dirname(__FILE__)),'..','..','lib')
5
+
6
+ Before do
7
+ # Using "announce" causes massive warnings on 1.9.2
8
+ @puts = true
9
+ @original_rubylib = ENV['RUBYLIB']
10
+ ENV['RUBYLIB'] = LIB_DIR + File::PATH_SEPARATOR + ENV['RUBYLIB'].to_s
11
+ end
12
+
13
+ After do
14
+ ENV['RUBYLIB'] = @original_rubylib
15
+ end
@@ -0,0 +1,57 @@
1
+ module Qricker
2
+ class RickerSpec
3
+ attr_accessor :name
4
+ attr_accessor :path
5
+ def to_s
6
+ "RickerSpec name:#{@name} path:#{@path}"
7
+ end
8
+ end
9
+
10
+ def Qricker.findPodspecs(path)
11
+ podspecs = []
12
+ path = Pathname(path)
13
+ if not path.absolute?
14
+ path = path.realpath
15
+ end
16
+ path.entries.each { |entry|
17
+ if (entry.extname == '.podspec' || entry.to_s.end_with?('.podspec.json'))
18
+ if path.basename.to_path == "Local Podspecs"
19
+ next
20
+ end
21
+ podspecs.push(path.join(entry))
22
+ end
23
+ }
24
+ if podspecs.count != 0
25
+ return podspecs
26
+ else
27
+ path.entries.each { |entry|
28
+ next if entry.to_path == "."
29
+ next if entry.to_path == ".."
30
+ next if entry.to_path == ".git"
31
+ next if entry.to_path == ".repo"
32
+ next if entry.to_path.start_with?("cocoapods-")
33
+ next if entry.to_path.start_with?("hive-deploy")
34
+ if File.directory?(path.join(entry))
35
+ subpath = path.join(entry)
36
+ ps = findPodspecs(subpath)
37
+ podspecs = podspecs + ps
38
+ end
39
+ }
40
+ end
41
+ return podspecs
42
+ end
43
+
44
+ def Qricker.allPodSpecs(path)
45
+ podspecs = findPodspecs(path)
46
+ transSpecs = []
47
+ if not podspecs.nil?
48
+ podspecs.each { |specpath|
49
+ spec = RickerSpec.new
50
+ spec.name = File.basename(specpath,".podspec")
51
+ spec.path = specpath.dirname
52
+ transSpecs << spec
53
+ }
54
+ end
55
+ return transSpecs
56
+ end
57
+ end
@@ -0,0 +1,3 @@
1
+ module Qricker
2
+ VERSION = '0.0.2'
3
+ end
data/lib/qricker.rb ADDED
@@ -0,0 +1,45 @@
1
+ require 'qricker/version.rb'
2
+ require 'qricker/podspecs.rb'
3
+ require 'parseconfig'
4
+ require 'cocoapods'
5
+ require 'pathname'
6
+ # Add requires for other files you add to your project here, so
7
+ # you just need to require this one file in your bin file
8
+
9
+ module Qricker
10
+ def Qricker.collectDependencies(config,dependecies, originSpec)
11
+ if config.get_groups.include?(originSpec)
12
+ podspec = Pod::Specification.from_file(config[originSpec]["PATH"]+"/#{originSpec}.podspec")
13
+ podspec.dependencies.each { |pspec|
14
+ if not dependecies.include? pspec.name
15
+ dependecies << pspec.name
16
+ collectDependencies(config,dependecies, pspec.name)
17
+ end
18
+ }
19
+ end
20
+ end
21
+ def Qricker.dependency(localfile , specnames)
22
+ config = ParseConfig.new(localfile)
23
+ if config.nil?
24
+ return []
25
+ end
26
+ allDependencies = []
27
+ if not specnames.nil?
28
+ specnames.each { |name|
29
+ collectDependencies(config,allDependencies, name)
30
+ }
31
+ end
32
+
33
+ outputDependencies = []
34
+ allDependencies.each { |dep|
35
+ if config.get_groups.include?(dep)
36
+ spec = RickerSpec.new()
37
+ spec.name = dep
38
+ spec.path = config[dep]["PATH"]
39
+ outputDependencies << spec
40
+ end
41
+ }
42
+ puts outputDependencies
43
+ return outputDependencies
44
+ end
45
+ end
data/qricker.gemspec ADDED
@@ -0,0 +1,26 @@
1
+ # Ensure we require the local version and not one we might have installed already
2
+ require File.join([File.dirname(__FILE__),'lib','qricker','version.rb'])
3
+ spec = Gem::Specification.new do |s|
4
+ s.name = 'qricker'
5
+ s.version = Qricker::VERSION
6
+ s.author = 'Your Name Here'
7
+ s.email = 'your@email.address.com'
8
+ s.homepage = 'http://your.website.com'
9
+ s.platform = Gem::Platform::RUBY
10
+ s.summary = 'A description of your project'
11
+ s.licenses = ['MIT']
12
+ s.files = `git ls-files`.split("
13
+ ")
14
+ s.require_paths << 'lib'
15
+ s.has_rdoc = true
16
+ s.extra_rdoc_files = ['README.rdoc','qricker.rdoc']
17
+ s.rdoc_options << '--title' << 'qricker' << '--main' << 'README.rdoc' << '-ri'
18
+ s.bindir = 'bin'
19
+ s.executables << 'qricker'
20
+ s.add_development_dependency('rake', "~> 0")
21
+ s.add_development_dependency('rdoc', "~> 0")
22
+ s.add_development_dependency('aruba', "~> 0")
23
+ s.add_runtime_dependency('gli','2.16.0')
24
+ s.add_runtime_dependency('cocoapods', '~> 1')
25
+ s.add_runtime_dependency('parseconfig', "~> 1")
26
+ end
data/qricker.rdoc ADDED
@@ -0,0 +1,5 @@
1
+ = qricker
2
+
3
+ Generate this with
4
+ qricker rdoc
5
+ After you have described your command line interface
data/test/a/a.podspec ADDED
File without changes
@@ -0,0 +1,14 @@
1
+ require 'test_helper'
2
+
3
+ class DefaultTest < Test::Unit::TestCase
4
+
5
+ def setup
6
+ end
7
+
8
+ def teardown
9
+ end
10
+
11
+ def test_the_truth
12
+ assert true
13
+ end
14
+ end
@@ -0,0 +1,9 @@
1
+ require 'test/unit'
2
+
3
+ # Add test libraries you want to use here, e.g. mocha
4
+
5
+ class Test::Unit::TestCase
6
+
7
+ # Add global extensions to the test case class here
8
+
9
+ end
metadata ADDED
@@ -0,0 +1,154 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: qricker
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ platform: ruby
6
+ authors:
7
+ - Your Name Here
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-08-16 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
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: rdoc
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
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: aruba
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: gli
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '='
60
+ - !ruby/object:Gem::Version
61
+ version: 2.16.0
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '='
67
+ - !ruby/object:Gem::Version
68
+ version: 2.16.0
69
+ - !ruby/object:Gem::Dependency
70
+ name: cocoapods
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '1'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '1'
83
+ - !ruby/object:Gem::Dependency
84
+ name: parseconfig
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '1'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '1'
97
+ description:
98
+ email: your@email.address.com
99
+ executables:
100
+ - qricker
101
+ extensions: []
102
+ extra_rdoc_files:
103
+ - README.rdoc
104
+ - qricker.rdoc
105
+ files:
106
+ - ".gitignore"
107
+ - Gemfile
108
+ - Gemfile.lock
109
+ - README.md
110
+ - README.rdoc
111
+ - Rakefile
112
+ - bin/qricker
113
+ - features/qricker.feature
114
+ - features/step_definitions/qricker_steps.rb
115
+ - features/support/env.rb
116
+ - lib/qricker.rb
117
+ - lib/qricker/podspecs.rb
118
+ - lib/qricker/version.rb
119
+ - qricker.gemspec
120
+ - qricker.rdoc
121
+ - test/a/a.podspec
122
+ - test/default_test.rb
123
+ - test/test_helper.rb
124
+ homepage: http://your.website.com
125
+ licenses:
126
+ - MIT
127
+ metadata: {}
128
+ post_install_message:
129
+ rdoc_options:
130
+ - "--title"
131
+ - qricker
132
+ - "--main"
133
+ - README.rdoc
134
+ - "-ri"
135
+ require_paths:
136
+ - lib
137
+ - lib
138
+ required_ruby_version: !ruby/object:Gem::Requirement
139
+ requirements:
140
+ - - ">="
141
+ - !ruby/object:Gem::Version
142
+ version: '0'
143
+ required_rubygems_version: !ruby/object:Gem::Requirement
144
+ requirements:
145
+ - - ">="
146
+ - !ruby/object:Gem::Version
147
+ version: '0'
148
+ requirements: []
149
+ rubyforge_project:
150
+ rubygems_version: 2.6.11
151
+ signing_key:
152
+ specification_version: 4
153
+ summary: A description of your project
154
+ test_files: []