Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Cleanup a bit. Not doing the `spec push` command for now.

  • Loading branch information...
commit 8a9b76f0947e17ad399ad7dc48b70e67fbd1d139 1 parent 1bb68e0
@alloy alloy authored
Showing with 8 additions and 20 deletions.
  1. +2 −1  lib/cocoapods/command.rb
  2. +6 −19 lib/cocoapods/command/spec.rb
View
3  lib/cocoapods/command.rb
@@ -36,7 +36,8 @@ def self.banner
" * $ pod setup --help\n" \
" * $ pod search --help\n" \
" * $ pod install --help\n" \
- " * $ pod repo --help"
+ " * $ pod repo --help\n" \
+ " * $ pod spec --help"
end
def self.options
View
25 lib/cocoapods/command/spec.rb
@@ -8,28 +8,19 @@ def self.banner
pod spec create NAME
Creates a PodSpec, in the current working dir, called `NAME.podspec'.
- Use this for existing libraries.
pod spec lint NAME.podspec
Validates `NAME.podspec'. In case `NAME.podspec' is omitted, it defaults
- to `*.podspec' in the current working dir.
-
- pod spec push NAME REMOTE
- Validates `NAME.podspec' in the current working dir, copies it to the
- local clone of the `REMOTE' spec-repo, and pushes it to the `REMOTE'
- spec-repo. In case `REMOTE' is omitted, it defaults to `master'.}
+ to `*.podspec' in the current working dir.}
end
def initialize(argv)
- super unless argv.arguments.size == 2
- case argv.arguments.first
- when 'create', 'lint'
- @action, @name = argv.arguments.first(2)
- when 'push'
- @action, @name, @remote = argv.arguments.first(3)
- else
+ args = argv.arguments
+ unless (args[0] == 'create' && args.size == 2) ||
+ (args[0] == 'lint' && args.size <= 2)
super
end
+ @action, @name = args.first(2)
end
def run
@@ -64,14 +55,10 @@ def create
end
def lint
- file = @name ? Pathname.new(@name) : config.project_podfile
+ file = @name ? Pathname.new(@name) : Pathname.pwd.glob('*.podspec').first
spec = Specification.from_podspec(file)
spec.validate!
end
-
- #def push
-
- #end
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.