cocoapods-docs 0.0.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 05423ae7d52969f139283286ce324cc79d2269a0
4
- data.tar.gz: 3a801a439917cd5fc09810109baf6a28458c1b63
3
+ metadata.gz: 7383ab357a4da6f1044dd1e0a01d6f48ed1d6144
4
+ data.tar.gz: 5877668cbc1049d6ff34450eb101560baa4edef9
5
5
  SHA512:
6
- metadata.gz: 87a479dd511875e020ad3f51ab3a2f354ea4bec8db96bb8aea5735392477427f8822f8207f6c4a81688cbe728ae88eaaad675eab462ccf7782a3ca6d5e10d541
7
- data.tar.gz: 1407e4b99f2b3610f4539be3d88f8f76835170b2358a59910c1729995a8d3876561652ed2aa3b3c39754c7480d74fa34f4f1ba1c96efea7db7b090f18026fa76
6
+ metadata.gz: ec8684b1a2e85e86b574bd1ad86a818ffd95d782db2dbc0e01f78be2a7d17bf0baa84af8e76c800cbca3638b2744466dcbef275d78289c21f835d38fd3735626
7
+ data.tar.gz: 118385703e61b294b6d735666d77d2adcfc0fef308f0951fddc07362f4293e506c7cc351b47a31820033391d5c645c24ee35b7666b5761784216427cee182308
@@ -0,0 +1,2 @@
1
+ inherit_from:
2
+ - .rubocop_cocoapods.yml
@@ -0,0 +1,89 @@
1
+ AllCops:
2
+ Include:
3
+ - ./Rakefile
4
+ - ./Gemfile
5
+ - ./*.gemspec
6
+ Exclude:
7
+ - ./spec/fixtures/**/*
8
+
9
+ # At the moment not ready to be used
10
+ # https://github.com/bbatsov/rubocop/issues/947
11
+ Documentation:
12
+ Enabled: false
13
+
14
+ #- CocoaPods -----------------------------------------------------------------#
15
+
16
+ # We adopted raise instead of fail.
17
+ SignalException:
18
+ EnforcedStyle: only_raise
19
+
20
+ # They are idiomatic
21
+ AssignmentInCondition:
22
+ Enabled: false
23
+
24
+ # Allow backticks
25
+ AsciiComments:
26
+ Enabled: false
27
+
28
+ # Indentation clarifies logic branches in implementations
29
+ IfUnlessModifier:
30
+ Enabled: false
31
+
32
+ # No enforced convention here.
33
+ SingleLineBlockParams:
34
+ Enabled: false
35
+
36
+ # We only add the comment when needed.
37
+ Encoding:
38
+ Enabled: false
39
+
40
+ # Having these make it easier to *not* forget to add one when adding a new
41
+ # value and you can simply copy the previous line.
42
+ TrailingComma:
43
+ EnforcedStyleForMultiline: comma
44
+
45
+ # Clashes with CLAide Command#validate!
46
+ GuardClause:
47
+ Enabled: false
48
+
49
+ # Not always desirable: lib/claide/command/plugins_helper.rb:12:15
50
+ Next:
51
+ Enabled: false
52
+
53
+ #- CocoaPods support for Ruby 1.8.7 ------------------------------------------#
54
+
55
+ HashSyntax:
56
+ EnforcedStyle: hash_rockets
57
+
58
+ Lambda:
59
+ Enabled: false
60
+
61
+ DotPosition:
62
+ EnforcedStyle: trailing
63
+
64
+ EachWithObject:
65
+ Enabled: false
66
+
67
+ Style/SpecialGlobalVars:
68
+ Enabled: false
69
+
70
+ #- CocoaPods specs -----------------------------------------------------------#
71
+
72
+ # Allow for `should.match /regexp/`.
73
+ AmbiguousRegexpLiteral:
74
+ Exclude:
75
+ - spec/**/*
76
+
77
+ # Allow `object.should == object` syntax.
78
+ Void:
79
+ Exclude:
80
+ - spec/**/*
81
+
82
+ ClassAndModuleChildren:
83
+ Exclude:
84
+ - spec/**/*
85
+
86
+ UselessComparison:
87
+ Exclude:
88
+ - spec/**/*
89
+
@@ -0,0 +1,25 @@
1
+ # Sets Travis to run the Ruby specs on OS X machines to be as close as possible
2
+ # to the user environment.
3
+ #
4
+ language: objective-c
5
+ addons:
6
+ code_climate:
7
+ repo_token: 568c9fe1160fda8ad6e7fdedd70851c5741045de9101633e60dc76d61b7e3d1d
8
+
9
+ env:
10
+ - RVM_RUBY_VERSION=system
11
+ # - RVM_RUBY_VERSION=1.8.7-p358
12
+
13
+ before_install:
14
+ - export LANG=en_US.UTF-8
15
+ - curl http://curl.haxx.se/ca/cacert.pem -o /usr/local/share/cacert.pem
16
+ - source ~/.rvm/scripts/rvm
17
+ - if [[ $RVM_RUBY_VERSION != 'system' ]]; then rvm install $RVM_RUBY_VERSION; fi
18
+ - rvm use $RVM_RUBY_VERSION
19
+ - if [[ $RVM_RUBY_VERSION == 'system' ]]; then sudo gem install bundler --no-ri --no-rdoc; else gem install bundler --no-ri --no-rdoc; fi
20
+
21
+
22
+ install:
23
+ - sudo bundle install --without=documentation
24
+
25
+ script: bundle exec rake spec
@@ -0,0 +1,11 @@
1
+ ## 0.2.0
2
+
3
+ ##### Enhancements
4
+
5
+ * Adopted new argument format of CLAide.
6
+ [Fabio Pelosin](https://github.com/fabiopelosin)
7
+
8
+
9
+ ## 0.1.0
10
+
11
+ * Initial release.
data/Gemfile CHANGED
@@ -1,4 +1,33 @@
1
- source 'https://rubygems.org'
1
+ source 'http://rubygems.org'
2
2
 
3
- # Specify your gem's dependencies in cocoapods-docs.gemspec
4
3
  gemspec
4
+
5
+ group :development do
6
+ gem 'cocoapods', :git => "https://github.com/CocoaPods/CocoaPods.git", :branch => 'master'
7
+ gem 'cocoapods-core', :git => "https://github.com/CocoaPods/Core.git", :branch => 'master'
8
+ gem 'claide', :git => 'https://github.com/CocoaPods/CLAide.git', :branch => 'master'
9
+
10
+ gem 'bacon'
11
+ gem 'mocha'
12
+ gem 'mocha-on-bacon'
13
+ gem 'prettybacon'
14
+ gem 'vcr'
15
+ gem 'webmock'
16
+
17
+ if RUBY_VERSION >= '1.9.3'
18
+ gem 'codeclimate-test-reporter', :require => nil
19
+ gem 'rubocop'
20
+ end
21
+ end
22
+
23
+ group :debugging do
24
+ gem 'awesome_print'
25
+ gem 'kicker'
26
+ gem 'pry'
27
+ gem 'rb-fsevent'
28
+ end
29
+
30
+ group :ruby_1_8_7 do
31
+ gem 'activesupport', '< 4'
32
+ gem 'mime-types', '< 2.0'
33
+ end
data/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Cocoapods::Docs
2
2
 
3
+ [![Build Status](https://img.shields.io/travis/CocoaPods/cocoapods-docs/master.svg?style=flat)](https://travis-ci.org/CocoaPods/cocoapods-docs)
4
+ [![Coverage](https://img.shields.io/codeclimate/coverage/github/CocoaPods/cocoapods-docs.svg?style=flat)](https://codeclimate.com/github/CocoaPods/cocoapods-docs)
5
+ [![Code Climate](https://img.shields.io/codeclimate/github/CocoaPods/cocoapods-docs.svg?style=flat)](https://codeclimate.com/github/CocoaPods/cocoapods-docs)
6
+
3
7
  Simple gem which offers convenient access to the documentation of a Pod via
4
8
  cocoadocs.org.
5
9
 
@@ -9,4 +13,4 @@ cocoadocs.org.
9
13
 
10
14
  ## Usage
11
15
 
12
- $ pod doc POD_NAME
16
+ $ pod spec doc POD_NAME
data/Rakefile CHANGED
@@ -1 +1,69 @@
1
- require "bundler/gem_tasks"
1
+ # encoding: utf-8
2
+
3
+ #-- Bootstrap --------------------------------------------------------------#
4
+
5
+ desc 'Initializes your working copy to run the specs'
6
+ task :bootstrap do
7
+ if system('which bundle')
8
+ title 'Installing gems'
9
+ sh 'bundle install'
10
+ else
11
+ $stderr.puts "\033[0;31m" \
12
+ "[!] Please install the bundler gem manually:\n" \
13
+ ' $ [sudo] gem install bundler'
14
+ "\e[0m"
15
+ exit 1
16
+ end
17
+ end
18
+
19
+ begin
20
+ require "bundler/gem_tasks"
21
+ task :default => :spec
22
+
23
+ #-- Specs ------------------------------------------------------------------#
24
+
25
+ desc 'Runs all the specs'
26
+ task :spec do
27
+ title 'Running Unit Tests'
28
+ files = FileList['spec/**/*_spec.rb'].shuffle.join(' ')
29
+ sh "bundle exec bacon #{files}"
30
+
31
+ title 'Checking code style...'
32
+ Rake::Task['rubocop'].invoke if RUBY_VERSION >= '1.9.3'
33
+ end
34
+
35
+ #-- Kick -------------------------------------------------------------------#
36
+
37
+ desc 'Automatically run specs for updated files'
38
+ task :kick do
39
+ exec 'bundle exec kicker -c'
40
+ end
41
+
42
+ #-- RuboCop ----------------------------------------------------------------#
43
+
44
+ if RUBY_VERSION >= '1.9.3'
45
+ require 'rubocop/rake_task'
46
+ RuboCop::RakeTask.new
47
+ end
48
+
49
+ rescue LoadError
50
+ $stderr.puts "\033[0;31m" \
51
+ '[!] Some Rake tasks haven been disabled because the environment' \
52
+ ' couldn’t be loaded. Be sure to run `rake bootstrap` first.' \
53
+ "\e[0m"
54
+ $stderr.puts e.message
55
+ $stderr.puts e.backtrace
56
+ $stderr.puts
57
+ end
58
+
59
+ #-- Helpers ------------------------------------------------------------------#
60
+
61
+ def title(title)
62
+ cyan_title = "\033[0;36m#{title}\033[0m"
63
+ puts
64
+ puts '-' * 80
65
+ puts cyan_title
66
+ puts '-' * 80
67
+ puts
68
+ end
69
+
@@ -1,3 +1,3 @@
1
1
  module CocoapodsDocs
2
- VERSION = "0.0.1"
2
+ VERSION = '0.2.0'
3
3
  end
@@ -2,13 +2,15 @@ module Pod
2
2
  class Command
3
3
  class Spec
4
4
  class Doc < Spec
5
- self.summary = "Opens the web documentation of a Pod."
5
+ self.summary = 'Opens the web documentation of a Pod.'
6
6
 
7
7
  self.description = <<-DESC
8
8
  Opens the web documentation of the Pod with the given NAME.
9
9
  DESC
10
10
 
11
- self.arguments = 'NAME'
11
+ self.arguments = [
12
+ CLAide::Argument.new('NAME', true),
13
+ ]
12
14
 
13
15
  def initialize(argv)
14
16
  @name = argv.shift_argument
@@ -17,7 +19,7 @@ module Pod
17
19
 
18
20
  def validate!
19
21
  super
20
- help! "A Pod name is required." unless @name
22
+ help! 'A Pod name is required.' unless @name
21
23
  end
22
24
 
23
25
  def run
@@ -0,0 +1,11 @@
1
+ require File.expand_path('../../../spec_helper', __FILE__)
2
+
3
+ module Pod
4
+ describe Command::Spec::Doc do
5
+ describe 'CLAide' do
6
+ it 'registers it self' do
7
+ Command.parse(%w(spec doc)).should.be.instance_of Command::Spec::Doc
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,59 @@
1
+ # Set up coverage analysis
2
+ #-----------------------------------------------------------------------------#
3
+
4
+ if RUBY_VERSION >= '1.9.3'
5
+ require 'codeclimate-test-reporter'
6
+ CodeClimate::TestReporter.configure do |config|
7
+ config.logger.level = Logger::WARN
8
+ end
9
+ CodeClimate::TestReporter.start
10
+ end
11
+
12
+ # Set up
13
+ #-----------------------------------------------------------------------------#
14
+
15
+ require 'pathname'
16
+ ROOT = Pathname.new(File.expand_path('../../', __FILE__))
17
+ $:.unshift((ROOT + 'lib').to_s)
18
+ $:.unshift((ROOT + 'spec').to_s)
19
+
20
+ require 'bundler/setup'
21
+ require 'bacon'
22
+ require 'mocha-on-bacon'
23
+ require 'pretty_bacon'
24
+ require 'cocoapods'
25
+
26
+ require 'cocoapods_plugin'
27
+
28
+ # Helpers
29
+ #-----------------------------------------------------------------------------#
30
+
31
+ module Pod
32
+ # Disable the wrapping so the output is deterministic in the tests.
33
+ #
34
+ UI.disable_wrap = true
35
+
36
+ # Redirects the messages to an internal store.
37
+ #
38
+ module UI
39
+ @output = ''
40
+ @warnings = ''
41
+
42
+ class << self
43
+ attr_accessor :output
44
+ attr_accessor :warnings
45
+
46
+ def puts(message = '')
47
+ @output << "#{message}\n"
48
+ end
49
+
50
+ def warn(message = '', _actions = [])
51
+ @warnings << "#{message}\n"
52
+ end
53
+
54
+ def print(message)
55
+ @output << message
56
+ end
57
+ end
58
+ end
59
+ end
metadata CHANGED
@@ -1,41 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-docs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fabio Pelosin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-14 00:00:00.000000000 Z
11
+ date: 2014-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.3'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  description: Simple gem which offers convenient access to the documentation of a Pod
@@ -46,7 +46,11 @@ executables: []
46
46
  extensions: []
47
47
  extra_rdoc_files: []
48
48
  files:
49
- - .gitignore
49
+ - ".gitignore"
50
+ - ".rubocop.yml"
51
+ - ".rubocop_cocoapods.yml"
52
+ - ".travis.yml"
53
+ - CHANGELOG.md
50
54
  - Gemfile
51
55
  - LICENSE.txt
52
56
  - README.md
@@ -55,6 +59,8 @@ files:
55
59
  - lib/cocoapods_docs.rb
56
60
  - lib/cocoapods_plugin.rb
57
61
  - lib/pod/command/spec/doc.rb
62
+ - spec/command/spec/doc_spec.rb
63
+ - spec/spec_helper.rb
58
64
  homepage: https://github.com/irrationalfab/cocoapods-docs
59
65
  licenses:
60
66
  - MIT
@@ -65,19 +71,22 @@ require_paths:
65
71
  - lib
66
72
  required_ruby_version: !ruby/object:Gem::Requirement
67
73
  requirements:
68
- - - '>='
74
+ - - ">="
69
75
  - !ruby/object:Gem::Version
70
76
  version: '0'
71
77
  required_rubygems_version: !ruby/object:Gem::Requirement
72
78
  requirements:
73
- - - '>='
79
+ - - ">="
74
80
  - !ruby/object:Gem::Version
75
81
  version: '0'
76
82
  requirements: []
77
83
  rubyforge_project:
78
- rubygems_version: 2.0.3
84
+ rubygems_version: 2.2.2
79
85
  signing_key:
80
86
  specification_version: 4
81
87
  summary: Simple gem which offers convenient access to the documentation of a Pod via
82
88
  cocoadocs.org.
83
- test_files: []
89
+ test_files:
90
+ - spec/command/spec/doc_spec.rb
91
+ - spec/spec_helper.rb
92
+ has_rdoc: