tycli 0.1.1.rc.1 → 0.1.1.rc.2

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: 262c34ac227dd565d6a239c170460cb119ab6bac
4
- data.tar.gz: 70a235d40efb6e3f2f1cd2ac09d669341b64d843
3
+ metadata.gz: 823abed64aba443dba11476d9a0b6aab3ba93ddd
4
+ data.tar.gz: c2c32bc5aabeeebf5758b3f730b002a06988e2d4
5
5
  SHA512:
6
- metadata.gz: 6b9fb01aee46b3021fbb306b60f0fc266e79e2ba95333e31eb1b5cd04b082fa529069e2958f7f0e8770ece2d322004d5cb98031e7f1a5b6a495616d3b71f39b2
7
- data.tar.gz: d27c6b79873bc8b5d987a62a7b4bcfb01fb7d6a9180d92e467232a8000038da668ffd40b250bc66e0a7dae29d58f739f7fd4a9c218fc8a7fb1d687338d261896
6
+ metadata.gz: 96f7ba5a34498d1812c36737d5772d9f591ddb46cdc969a45fac89ecbeae397c2c6ee45322cc6a8cec4cd7527ae780c8bd71095634eea6890e7afbe882add753
7
+ data.tar.gz: b45134e149c52eb991115f4ba0bc45306d4764086c17035714f058c9e4fff8fe60bfa2fbef8277cbcae67641d8216a37dffddaa5851a2e066e87edc03f9f7fb3
data/bin/tuya ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'tycli'
4
+ require 'cocoapods'
5
+ require 'colored'
6
+
7
+ # help! 'ddd'
8
+ #
9
+ # c = TYCommand2.new
10
+ # c.exe(ARGV)
11
+
12
+ Tuya::Command.run(ARGV)
13
+
14
+
15
+ # TYCommand.run(ARGV)
@@ -0,0 +1,16 @@
1
+ module Tuya
2
+ class Command
3
+ class CI < Command
4
+ class ShowLogTips < CI
5
+ self.abstract_command = false
6
+ self.summary = "show ci log error tips"
7
+ self.command = 'tips'
8
+
9
+ def run
10
+ puts("when ci build error, you can search keyworkds: \n")
11
+ puts("- ERROR\nfatal error:\nfastlane finished with errors\n")
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,42 @@
1
+ $LOAD_PATH.unshift(File.expand_path('../../lib', __FILE__))
2
+
3
+ require 'tycli/command/ci/show_log_tips'
4
+
5
+ require 'tycli/command'
6
+
7
+ module Tuya
8
+ class Command
9
+ class CI < Command
10
+
11
+ self.abstract_command = true
12
+
13
+ self.summary = 'helper for ci'
14
+ self.command = 'ci'
15
+
16
+ self.description = <<-DESC
17
+ tuya ci helper
18
+ DESC
19
+ def self.options
20
+ [
21
+ ['--te=te', 'te te t e']
22
+ ].concat(super)
23
+ end
24
+
25
+ def validate!
26
+ # help! "name need" unless @name
27
+ end
28
+
29
+ def initialize(argv)
30
+ super
31
+ # @is_simple = argv.flag?('simple', true)
32
+ # @name = argv.option('name')
33
+ end
34
+
35
+ def run
36
+ super
37
+ end
38
+ end
39
+ end
40
+ end
41
+
42
+
@@ -0,0 +1,15 @@
1
+ module Tuya
2
+ class Command
3
+ class Lib < Command
4
+ class Create < Lib
5
+ self.abstract_command = false
6
+ self.summary = "create a module"
7
+ self.command = 'create'
8
+
9
+ def run
10
+ puts("we will create a module named: #{@name} #{@is_simple}")
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,34 @@
1
+ module Tuya
2
+ class Command
3
+ class Lib < Command
4
+ class CreateSimple < Lib
5
+ self.abstract_command = false
6
+ self.summary = "create a module"
7
+ self.command = 'create-simple'
8
+
9
+ def run
10
+ puts("we will create a simple module named: #{@name}")
11
+
12
+ puts `pod lib create #{@name} --template-url=https://code.registry.wgine.com/client-platform/pod-template-simple.git`
13
+ end
14
+
15
+ def popen3(bin, command)
16
+ require 'open3'
17
+ Open3.popen3(bin, *command) do |i, o, e, t|
18
+ # reader(o, stdout)
19
+ # reader(e, stderr)
20
+ i.close
21
+
22
+ status = t.value
23
+
24
+ o.flush
25
+ e.flush
26
+ sleep(0.01)
27
+
28
+ status
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,43 @@
1
+ $LOAD_PATH.unshift(File.expand_path('../../lib', __FILE__))
2
+
3
+ require 'tycli/command/lib/create'
4
+ require 'tycli/command/lib/create_simple'
5
+
6
+ require 'tycli/command'
7
+
8
+ module Tuya
9
+ class Command
10
+ class Lib < Command
11
+
12
+ self.abstract_command = true
13
+
14
+ self.summary = 'create module'
15
+ self.command = 'lib'
16
+
17
+ self.description = <<-DESC
18
+ tuya cli tools
19
+ DESC
20
+ def self.options
21
+ [
22
+ ['--name=module_name', '--name to named your module']
23
+ ].concat(super)
24
+ end
25
+
26
+ def validate!
27
+ help! "name need" unless @name
28
+ end
29
+
30
+ def initialize(argv)
31
+ super
32
+ @is_simple = argv.flag?('simple', true)
33
+ @name = argv.option('name')
34
+ end
35
+
36
+ def run
37
+ super
38
+ end
39
+ end
40
+ end
41
+ end
42
+
43
+
@@ -0,0 +1,20 @@
1
+ # encoding: utf-8
2
+
3
+ $LOAD_PATH.unshift(File.expand_path('../../lib', __FILE__))
4
+
5
+ require 'claide'
6
+ require 'colored'
7
+
8
+
9
+ module Tuya
10
+ class Command < CLAide::Command
11
+
12
+ require 'tycli/command/lib'
13
+ require 'tycli/command/ci'
14
+
15
+ self.abstract_command = true
16
+
17
+ self.description = 'tuya cli'
18
+ self.command = 'tuya'
19
+ end
20
+ end
data/lib/tycli/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Tycli
2
- VERSION = "0.1.1.rc.1"
2
+ VERSION = "0.1.1.rc.2"
3
3
  end
data/lib/tycli.rb CHANGED
@@ -1,7 +1,2 @@
1
- require "tycli/version"
2
1
 
3
- module Tycli
4
- # Your code goes here...
5
- #
6
- puts("tycli here")
7
- end
2
+ require 'tycli/command'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tycli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1.rc.1
4
+ version: 0.1.1.rc.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - fangdong
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-04 00:00:00.000000000 Z
11
+ date: 2018-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,26 +52,39 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: CLAide
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  description: 哈哈哈
56
70
  email:
57
71
  - fangdong@tuyasmart.com
58
- executables: []
72
+ executables:
73
+ - tuya
59
74
  extensions: []
60
75
  extra_rdoc_files: []
61
76
  files:
62
- - ".gitignore"
63
- - ".rspec"
64
- - ".travis.yml"
65
- - CODE_OF_CONDUCT.md
66
- - Gemfile
67
77
  - LICENSE.txt
68
78
  - README.md
69
- - Rakefile
70
- - bin/console
71
- - bin/setup
79
+ - bin/tuya
72
80
  - lib/tycli.rb
81
+ - lib/tycli/command.rb
82
+ - lib/tycli/command/ci.rb
83
+ - lib/tycli/command/ci/show_log_tips.rb
84
+ - lib/tycli/command/lib.rb
85
+ - lib/tycli/command/lib/create.rb
86
+ - lib/tycli/command/lib/create_simple.rb
73
87
  - lib/tycli/version.rb
74
- - tycli.gemspec
75
88
  homepage: https://docs.tuya.com/cn/
76
89
  licenses:
77
90
  - MIT
data/.gitignore DELETED
@@ -1,11 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
9
-
10
- # rspec failure tracking
11
- .rspec_status
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
data/.travis.yml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- sudo: false
3
- language: ruby
4
- cache: bundler
5
- rvm:
6
- - 2.3.7
7
- before_install: gem install bundler -v 1.16.3
data/CODE_OF_CONDUCT.md DELETED
@@ -1,74 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- In the interest of fostering an open and welcoming environment, we as
6
- contributors and maintainers pledge to making participation in our project and
7
- our community a harassment-free experience for everyone, regardless of age, body
8
- size, disability, ethnicity, gender identity and expression, level of experience,
9
- nationality, personal appearance, race, religion, or sexual identity and
10
- orientation.
11
-
12
- ## Our Standards
13
-
14
- Examples of behavior that contributes to creating a positive environment
15
- include:
16
-
17
- * Using welcoming and inclusive language
18
- * Being respectful of differing viewpoints and experiences
19
- * Gracefully accepting constructive criticism
20
- * Focusing on what is best for the community
21
- * Showing empathy towards other community members
22
-
23
- Examples of unacceptable behavior by participants include:
24
-
25
- * The use of sexualized language or imagery and unwelcome sexual attention or
26
- advances
27
- * Trolling, insulting/derogatory comments, and personal or political attacks
28
- * Public or private harassment
29
- * Publishing others' private information, such as a physical or electronic
30
- address, without explicit permission
31
- * Other conduct which could reasonably be considered inappropriate in a
32
- professional setting
33
-
34
- ## Our Responsibilities
35
-
36
- Project maintainers are responsible for clarifying the standards of acceptable
37
- behavior and are expected to take appropriate and fair corrective action in
38
- response to any instances of unacceptable behavior.
39
-
40
- Project maintainers have the right and responsibility to remove, edit, or
41
- reject comments, commits, code, wiki edits, issues, and other contributions
42
- that are not aligned to this Code of Conduct, or to ban temporarily or
43
- permanently any contributor for other behaviors that they deem inappropriate,
44
- threatening, offensive, or harmful.
45
-
46
- ## Scope
47
-
48
- This Code of Conduct applies both within project spaces and in public spaces
49
- when an individual is representing the project or its community. Examples of
50
- representing a project or community include using an official project e-mail
51
- address, posting via an official social media account, or acting as an appointed
52
- representative at an online or offline event. Representation of a project may be
53
- further defined and clarified by project maintainers.
54
-
55
- ## Enforcement
56
-
57
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
- reported by contacting the project team at fangdong@tuyasmart.com. All
59
- complaints will be reviewed and investigated and will result in a response that
60
- is deemed necessary and appropriate to the circumstances. The project team is
61
- obligated to maintain confidentiality with regard to the reporter of an incident.
62
- Further details of specific enforcement policies may be posted separately.
63
-
64
- Project maintainers who do not follow or enforce the Code of Conduct in good
65
- faith may face temporary or permanent repercussions as determined by other
66
- members of the project's leadership.
67
-
68
- ## Attribution
69
-
70
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
- available at [http://contributor-covenant.org/version/1/4][version]
72
-
73
- [homepage]: http://contributor-covenant.org
74
- [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile DELETED
@@ -1,6 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
-
5
- # Specify your gem's dependencies in tycli.gemspec
6
- gemspec
data/Rakefile DELETED
@@ -1,6 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
-
4
- RSpec::Core::RakeTask.new(:spec)
5
-
6
- task :default => :spec
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "tycli"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start(__FILE__)
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
data/tycli.gemspec DELETED
@@ -1,38 +0,0 @@
1
-
2
- lib = File.expand_path("../lib", __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require "tycli/version"
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "tycli"
8
- spec.version = Tycli::VERSION
9
- spec.authors = ["fangdong"]
10
- spec.email = ["fangdong@tuyasmart.com"]
11
-
12
- spec.summary = "你猜"
13
- spec.description = "哈哈哈"
14
- spec.homepage = "https://docs.tuya.com/cn/"
15
- spec.license = "MIT"
16
-
17
- # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
18
- # to allow pushing to a single host or delete this section to allow pushing to any host.
19
- # if spec.respond_to?(:metadata)
20
- # spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
21
- # else
22
- # raise "RubyGems 2.0 or newer is required to protect against " \
23
- # "public gem pushes."
24
- # end
25
-
26
- # Specify which files should be added to the gem when it is released.
27
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
28
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
29
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
30
- end
31
- spec.bindir = "exe"
32
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
33
- spec.require_paths = ["lib"]
34
-
35
- spec.add_development_dependency "bundler", "~> 1.16"
36
- spec.add_development_dependency "rake", "~> 10.0"
37
- spec.add_development_dependency "rspec", "~> 3.0"
38
- end