podspec 0.1.0dev → 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: f079f055a3e35f6596b409a485052f5cca48ff3a
4
- data.tar.gz: 24278aeb062238789561d1604c783cae8863ada5
3
+ metadata.gz: b798322ce45c6e44cfafe969d3649fea023deb1e
4
+ data.tar.gz: 2fd359c2adcea780866160461bab3ce488bdbec6
5
5
  SHA512:
6
- metadata.gz: 7beb7ea557a17b7527745584478fc77d6b8dbcd0e45f8654cbd46386b4f512dbda39fdc0ebc4f789814089011bda852d76474979426c9396fd081f9595a41b65
7
- data.tar.gz: 7c62bb78d367046d3b9964151b1452e8b68dc17b9b1a1c790aef26b0aa5da169ade0615d482384ea2063d1aa8674bcc5163a816b1cabf304ad6d57f8d7b299a6
6
+ metadata.gz: f02586759c08c70d272fd583fd024c5046ff22522b9a7be2482652f23e60111e5fdea7a4f0e0d7c9e2afc658d8273076903220645bf23a0e68ce07349f2711aa
7
+ data.tar.gz: 239c9ed705e3c0c58c88669ff5513b2b920ae26f1dfcde3afb21df8dfd06e675811f6b1868690854c7341c40041ae6631612ef000362019108415c44750868be
data/.gitignore CHANGED
@@ -28,7 +28,7 @@ build/
28
28
 
29
29
  # for a library or gem, you might want to ignore these files since the code is
30
30
  # intended to run in multiple environments; otherwise, check them in:
31
- # Gemfile.lock
31
+ Gemfile.lock
32
32
  # .ruby-version
33
33
  # .ruby-gemset
34
34
 
@@ -0,0 +1,12 @@
1
+ language: objective-c
2
+ osx_image: xcode7.3
3
+ install:
4
+ - gem install bundler
5
+ - bundle install
6
+ script:
7
+ - bundle exec podspec
8
+ - gem install podspec --pre
9
+ after_script:
10
+ - bundle exec podspec postmates/PMJSON
11
+ - cat PMJSON.podspec
12
+ - pod spec lint PMJSON.podspec --verbose
@@ -0,0 +1,15 @@
1
+ # Podspec
2
+
3
+ ## 0.1.1
4
+
5
+ - [gemspec] set `github-readme` version
6
+
7
+ ## 0.1.0
8
+
9
+ - [gemspec] use `github-readme`
10
+ - [gemspec] remove `netrc` dependency
11
+ - [podspec] minor edit to `source_files`
12
+
13
+ ## 0.1.0.dev
14
+
15
+ - Initial version
data/README.md CHANGED
@@ -4,20 +4,20 @@ Effortlessly create a [CocoaPods Podspec](https://guides.cocoapods.org/making/sp
4
4
 
5
5
  ![](http://i.giphy.com/rsQu1BC0BF8wo.gif)
6
6
 
7
+ [![Gem Version](https://badge.fury.io/rb/podspec.svg)](https://badge.fury.io/rb/podspec) [![Build Status](https://travis-ci.org/dkhamsing/podspec.svg)](https://travis-ci.org/dkhamsing/podspec)
8
+
7
9
  ## Installation
8
10
 
9
11
  ```shell
10
12
  $ git clone https://github.com/dkhamsing/podspec.git
11
13
  $ cd podspec/
12
- $ rake install
14
+ $ bundle install
13
15
  ```
14
16
 
15
- This project requires GitHub credentials in [.netrc](https://github.com/octokit/octokit.rb#using-a-netrc-file).
16
-
17
17
  ## Usage
18
18
 
19
19
  ```shell
20
- $ podspec postmates/PMJSON
20
+ $ bundle exec podspec postmates/PMJSON
21
21
  podspec 0.1.0
22
22
  Generating Podspec for postmates/PMJSON...
23
23
  Wrote PMJSON.podspec in 3s ✨
@@ -42,12 +42,12 @@ Pod::Spec.new do |s|
42
42
 
43
43
  s.source = { :git => "https://github.com/postmates/PMJSON.git", :tag => "v0.9" }
44
44
 
45
- s.source_files = "Sources/*",
45
+ s.source_files = "Sources/*.{h,m,swift}"
46
46
 
47
- s.ios.deployment_target = '9.0'
48
- # s.osx.deployment_target = '10.9'
49
- # s.watchos.deployment_target = '2.0'
50
- # s.tvos.deployment_target = '9.0'
47
+ s.ios.deployment_target = "8.0"
48
+ # s.osx.deployment_target = "10.9"
49
+ # s.watchos.deployment_target = "2.0"
50
+ # s.tvos.deployment_target = "9.0"
51
51
  end
52
52
  ```
53
53
 
@@ -65,7 +65,7 @@ Analyzed 1 podspec.
65
65
  PMJSON.podspec passed validation.
66
66
  ```
67
67
 
68
- 😎
68
+ :coffee:
69
69
 
70
70
  ## Contact
71
71
 
@@ -1,8 +1,7 @@
1
1
  # Parse GitHub repository into spec values
2
2
  module Podspec
3
3
  class << self
4
- require 'octokit'
5
- require 'netrc'
4
+ require 'github-readme'
6
5
 
7
6
  SOURCE_FILES = [
8
7
  'Sources'
@@ -12,7 +11,7 @@ module Podspec
12
11
  puts "Generating Podspec for #{repo}..."
13
12
 
14
13
  begin
15
- c = Octokit::Client.new(netrc: true)
14
+ c = Octokit
16
15
  rescue => e
17
16
  return {
18
17
  'error' => e
@@ -84,18 +83,20 @@ module Podspec
84
83
 
85
84
  git = r['git_url']
86
85
 
87
- begin
88
- re = c.readme repo
89
- content = re['content']
90
- readme = Base64.decode64 content unless content.nil?
91
- rescue => e
86
+ r = GitHubReadme::get repo
87
+ if r['error'].nil?
88
+ readme = r['readme']
89
+ description = r['summary']
90
+ else
92
91
  readme = nil
92
+ description = nil
93
93
  end
94
94
 
95
95
  return {
96
96
  'error' => nil,
97
97
  'name' => name,
98
98
  'summary' => summary,
99
+ 'description' => description,
99
100
  'license' => license,
100
101
  'git' => git,
101
102
  'tag' => tag,
@@ -1,6 +1,6 @@
1
1
  # Version, constants
2
2
  module Podspec
3
- VERSION = "0.1.0dev"
3
+ VERSION = "0.1.1"
4
4
 
5
5
  PRODUCT = 'podspec'
6
6
  end
@@ -1,9 +1,7 @@
1
1
  # Write Podspec file
2
2
  module Podspec
3
3
  class << self
4
- require 'pp'
5
-
6
- DESC = "# s.description = \"A description of the Pod more detailed than the summary.\""
4
+ DESC = "# s.description = \"A description of the Pod more detailed than the summary.\""
7
5
  IOS = '8.0'
8
6
 
9
7
  def write_podspec(s)
@@ -19,27 +17,17 @@ module Podspec
19
17
  summary = "\"#{s['summary']}\""
20
18
 
21
19
  readme = s['readme']
22
- num_lines = 1
23
- description = if readme.nil?
24
- DESC
20
+ d = s['description']
21
+
22
+ if d.nil?
23
+ description = DESC
25
24
  else
26
- lines = readme.split "\n"
27
- d = []
28
- lines[1..-1].each do |l|
29
- unless (l.include? '==') || (l.include? '[') || (l.include? '#') || (l.include? '<')
30
- d.push l if l.length > 0
25
+ description =
26
+ if d == summary
27
+ DESC
28
+ else
29
+ "s.description = \"#{d}\""
31
30
  end
32
- # puts d.count
33
- break if d.count == num_lines
34
- end
35
-
36
- d = "\"#{d[0]}\""
37
-
38
- if d == summary
39
- DESC
40
- else
41
- "s.description = #{d}"
42
- end
43
31
  end
44
32
 
45
33
  source_files = "#{s['source_folder']}/*.{h,m,swift}"
@@ -59,7 +47,7 @@ module Podspec
59
47
 
60
48
  s.source = { :git => "#{git}", :tag => "#{s['tag']}" }
61
49
 
62
- s.source_files = "#{source_files}",
50
+ s.source_files = "#{source_files}"
63
51
 
64
52
  s.ios.deployment_target = "#{IOS}"
65
53
  # s.osx.deployment_target = "10.9"
@@ -12,12 +12,12 @@ Gem::Specification.new do |spec|
12
12
  spec.summary = 'Effortlessly create a CocoaPods Podspec.'
13
13
  spec.description = spec.summary
14
14
  spec.homepage = 'https://github.com/dkhamsing/podspec'
15
+ spec.license = 'MIT'
15
16
 
16
17
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
18
  spec.bindir = 'bin'
18
19
  spec.executables = [Podspec::PRODUCT]
19
20
  spec.require_paths = ['lib']
20
21
 
21
- spec.add_runtime_dependency 'octokit', '~> 4.2.0' # github
22
- spec.add_dependency 'netrc', '~> 0.11.0' # credentials
22
+ spec.add_runtime_dependency 'github-readme', '~> 0.1.0.pre'
23
23
  end
metadata CHANGED
@@ -1,43 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: podspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0dev
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - dkhamsing
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-18 00:00:00.000000000 Z
11
+ date: 2016-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: octokit
14
+ name: github-readme
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ~>
18
18
  - !ruby/object:Gem::Version
19
- version: 4.2.0
19
+ version: 0.1.0.pre
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ~>
25
25
  - !ruby/object:Gem::Version
26
- version: 4.2.0
27
- - !ruby/object:Gem::Dependency
28
- name: netrc
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ~>
32
- - !ruby/object:Gem::Version
33
- version: 0.11.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.11.0
26
+ version: 0.1.0.pre
41
27
  description: Effortlessly create a CocoaPods Podspec.
42
28
  email:
43
29
  - dkhamsing8@gmail.com
@@ -47,8 +33,9 @@ extensions: []
47
33
  extra_rdoc_files: []
48
34
  files:
49
35
  - .gitignore
36
+ - .travis.yml
37
+ - CHANGELOG.md
50
38
  - Gemfile
51
- - Gemfile.lock
52
39
  - LICENSE
53
40
  - README.md
54
41
  - Rakefile
@@ -60,7 +47,8 @@ files:
60
47
  - lib/podspec/write.rb
61
48
  - podspec.gemspec
62
49
  homepage: https://github.com/dkhamsing/podspec
63
- licenses: []
50
+ licenses:
51
+ - MIT
64
52
  metadata: {}
65
53
  post_install_message:
66
54
  rdoc_options: []
@@ -73,9 +61,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
73
61
  version: '0'
74
62
  required_rubygems_version: !ruby/object:Gem::Requirement
75
63
  requirements:
76
- - - '>'
64
+ - - '>='
77
65
  - !ruby/object:Gem::Version
78
- version: 1.3.1
66
+ version: '0'
79
67
  requirements: []
80
68
  rubyforge_project:
81
69
  rubygems_version: 2.0.14
@@ -1,29 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- podspec (0.1.0)
5
- netrc
6
- octokit (~> 4.2.0)
7
-
8
- GEM
9
- remote: https://rubygems.org/
10
- specs:
11
- addressable (2.3.8)
12
- faraday (0.9.2)
13
- multipart-post (>= 1.2, < 3)
14
- multipart-post (2.0.0)
15
- netrc (0.11.0)
16
- octokit (4.2.0)
17
- sawyer (~> 0.6.0, >= 0.5.3)
18
- sawyer (0.6.0)
19
- addressable (~> 2.3.5)
20
- faraday (~> 0.8, < 0.10)
21
-
22
- PLATFORMS
23
- ruby
24
-
25
- DEPENDENCIES
26
- podspec!
27
-
28
- BUNDLED WITH
29
- 1.10.6