-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit e169e31
Showing
13 changed files
with
197 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.DS_Store | ||
pkg | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
source 'https://rubygems.org' | ||
|
||
# Specify your gem's dependencies in cocoapods-embed-flutter.gemspec | ||
gemspec | ||
|
||
group :development do | ||
gem 'cocoapods' | ||
|
||
gem 'mocha' | ||
gem 'bacon' | ||
gem 'mocha-on-bacon' | ||
gem 'prettybacon' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Copyright (c) 2022 Soumya Mahunt <soumya.mahunt@tatadigital.com> | ||
|
||
MIT License | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
"Software"), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# cocoapods-embed-flutter | ||
|
||
A description of cocoapods-embed-flutter. | ||
|
||
## Installation | ||
|
||
$ gem install cocoapods-embed-flutter | ||
|
||
## Usage | ||
|
||
$ pod spec flutter POD_NAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
require 'bundler/gem_tasks' | ||
|
||
def specs(dir) | ||
FileList["spec/#{dir}/*_spec.rb"].shuffle.join(' ') | ||
end | ||
|
||
desc 'Runs all the specs' | ||
task :specs do | ||
sh "bundle exec bacon #{specs('**')}" | ||
end | ||
|
||
task :default => :specs | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# coding: utf-8 | ||
lib = File.expand_path('../lib', __FILE__) | ||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) | ||
require 'cocoapods-embed-flutter/gem_version.rb' | ||
|
||
Gem::Specification.new do |spec| | ||
spec.name = 'cocoapods-embed-flutter' | ||
spec.version = CocoapodsEmbedFlutter::VERSION | ||
spec.authors = ['Soumya Mahunt'] | ||
spec.email = ['soumya.mahunt@tatadigital.com'] | ||
spec.description = %q{A short description of cocoapods-embed-flutter.} | ||
spec.summary = %q{A longer description of cocoapods-embed-flutter.} | ||
spec.homepage = 'https://github.com/EXAMPLE/cocoapods-embed-flutter' | ||
spec.license = 'MIT' | ||
|
||
spec.files = `git ls-files`.split($/) | ||
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } | ||
spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) | ||
spec.require_paths = ['lib'] | ||
|
||
spec.add_development_dependency 'bundler', '~> 1.3' | ||
spec.add_development_dependency 'rake' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
require 'cocoapods-embed-flutter/gem_version' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
require 'cocoapods-embed-flutter/command/flutter' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
module Pod | ||
class Command | ||
# This is an example of a cocoapods plugin adding a top-level subcommand | ||
# to the 'pod' command. | ||
# | ||
# You can also create subcommands of existing or new commands. Say you | ||
# wanted to add a subcommand to `list` to show newly deprecated pods, | ||
# (e.g. `pod list deprecated`), there are a few things that would need | ||
# to change. | ||
# | ||
# - move this file to `lib/pod/command/list/deprecated.rb` and update | ||
# the class to exist in the the Pod::Command::List namespace | ||
# - change this class to extend from `List` instead of `Command`. This | ||
# tells the plugin system that it is a subcommand of `list`. | ||
# - edit `lib/cocoapods_plugins.rb` to require this file | ||
# | ||
# @todo Create a PR to add your plugin to CocoaPods/cocoapods.org | ||
# in the `plugins.json` file, once your plugin is released. | ||
# | ||
class Flutter < Command | ||
self.summary = 'Short description of cocoapods-embed-flutter.' | ||
|
||
self.description = <<-DESC | ||
Longer description of cocoapods-embed-flutter. | ||
DESC | ||
|
||
self.arguments = 'NAME' | ||
|
||
def initialize(argv) | ||
@name = argv.shift_argument | ||
super | ||
end | ||
|
||
def validate! | ||
super | ||
help! 'A Pod name is required.' unless @name | ||
end | ||
|
||
def run | ||
UI.puts "Add your implementation for the cocoapods-embed-flutter plugin in #{__FILE__}" | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module CocoapodsEmbedFlutter | ||
VERSION = "0.0.1" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
require 'cocoapods-embed-flutter/command' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
require File.expand_path('../../spec_helper', __FILE__) | ||
|
||
module Pod | ||
describe Command::Flutter do | ||
describe 'CLAide' do | ||
it 'registers it self' do | ||
Command.parse(%w{ flutter }).should.be.instance_of Command::Flutter | ||
end | ||
end | ||
end | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
require 'pathname' | ||
ROOT = Pathname.new(File.expand_path('../../', __FILE__)) | ||
$:.unshift((ROOT + 'lib').to_s) | ||
$:.unshift((ROOT + 'spec').to_s) | ||
|
||
require 'bundler/setup' | ||
require 'bacon' | ||
require 'mocha-on-bacon' | ||
require 'pretty_bacon' | ||
require 'pathname' | ||
require 'cocoapods' | ||
|
||
Mocha::Configuration.prevent(:stubbing_non_existent_method) | ||
|
||
require 'cocoapods_plugin' | ||
|
||
#-----------------------------------------------------------------------------# | ||
|
||
module Pod | ||
|
||
# Disable the wrapping so the output is deterministic in the tests. | ||
# | ||
UI.disable_wrap = true | ||
|
||
# Redirects the messages to an internal store. | ||
# | ||
module UI | ||
@output = '' | ||
@warnings = '' | ||
|
||
class << self | ||
attr_accessor :output | ||
attr_accessor :warnings | ||
|
||
def puts(message = '') | ||
@output << "#{message}\n" | ||
end | ||
|
||
def warn(message = '', actions = []) | ||
@warnings << "#{message}\n" | ||
end | ||
|
||
def print(message) | ||
@output << message | ||
end | ||
end | ||
end | ||
end | ||
|
||
#-----------------------------------------------------------------------------# |