pullentity-client 0.0.1 → 0.0.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 +8 -8
- data/README.md +32 -2
- data/lib/pullentity-client/.DS_Store +0 -0
- data/lib/pullentity-client/generate/auth.rb +1 -1
- data/lib/pullentity-client/thor/.DS_Store +0 -0
- data/lib/pullentity-client/thor/shell/basic.rb +1 -0
- data/lib/pullentity-client/thor/shell/password.rb +41 -0
- data/lib/pullentity-client/version.rb +1 -1
- data/lib/pullentity-client.rb +20 -0
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YzFiMjBiZTFiMjEzZWJkYmE3OGZiNTQzNGVhNDBhNzE4MDJhODhiMQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MzRkMTEyNzJkNDU0OGUzYzRiYTMyNTQ2NWIxNjYyMGRkMDQ3ZmJjMQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZWQzYjMxNTdlNmQ3Yjc2MDFjMzdhZTcxZTc3NjRiNjgzOTVjZDc4YmY1ZDk0
|
10
|
+
Yjk0NjU0YTQ3YzcwMGRjZmI2M2JjNDkwOGYwNTYyNGQ1MzkzYTgwMjExODI1
|
11
|
+
NzkwNGMwNjdhNzhlZTIwM2Q4ZDQ4ODE5MzdkZmYwODQ4NGE2ODA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZjBjNWE5OGVmYmRmNjA4NTIyZDE2MWNiN2MyMDE2MTBmMTkxZWEyYWQzMWYy
|
14
|
+
NTE1Y2E5ZTMwOWJmNjY2ZTc1MGNiMDAxZTc0NDI0NWI2ZDBhZGYwYWViMTE0
|
15
|
+
OWYzYmY5OGQwZjVjYWI3MDhhMmM2ZDA3MGMxNWQxOTQ3ZDkzNTM=
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Pullentity::Client
|
2
2
|
|
3
|
-
|
3
|
+
This gem provides a simple builder workspace for make pullentity sites with haml and sass
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -18,7 +18,33 @@ Or install it yourself as:
|
|
18
18
|
|
19
19
|
## Usage
|
20
20
|
|
21
|
-
|
21
|
+
### commands
|
22
|
+
|
23
|
+
Create project
|
24
|
+
|
25
|
+
pullentity project new your_theme_name
|
26
|
+
|
27
|
+
Run project
|
28
|
+
|
29
|
+
pullentity s # or pullentity server
|
30
|
+
|
31
|
+
since its a middleman app you can
|
32
|
+
|
33
|
+
middleman s or middleman server
|
34
|
+
|
35
|
+
Setup your credentials
|
36
|
+
|
37
|
+
pullentity login your@email.com
|
38
|
+
|
39
|
+
Choose the site you want to export theme.
|
40
|
+
|
41
|
+
pullentity select_site
|
42
|
+
|
43
|
+
Export and install the theme for your site.
|
44
|
+
|
45
|
+
pullentity export
|
46
|
+
|
47
|
+
|
22
48
|
|
23
49
|
## Contributing
|
24
50
|
|
@@ -27,3 +53,7 @@ TODO: Write usage instructions here
|
|
27
53
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
54
|
4. Push to the branch (`git push origin my-new-feature`)
|
29
55
|
5. Create new Pull Request
|
56
|
+
|
57
|
+
# TODO
|
58
|
+
|
59
|
+
1. upload assets.
|
Binary file
|
@@ -23,7 +23,7 @@ module Pullentity
|
|
23
23
|
raise
|
24
24
|
end
|
25
25
|
say("In order to retreive your authentication token we need your pullentity password", :yellow)
|
26
|
-
password = ask("write your password: ", :magenta )
|
26
|
+
password = ask("write your password: ", :magenta, :password => true )
|
27
27
|
uri = URI.parse("#{domain}/api/v1/login.json")
|
28
28
|
http = Net::HTTP.new(uri.host, uri.port)
|
29
29
|
request = Net::HTTP::Post.new(uri.request_uri)
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1,41 @@
|
|
1
|
+
require 'tempfile'
|
2
|
+
|
3
|
+
class Thor
|
4
|
+
module Shell
|
5
|
+
module Password
|
6
|
+
if RUBY_PLATFORM =~ /mswin32|mingw32/
|
7
|
+
|
8
|
+
def ask_passwordly(statement, color = nil)
|
9
|
+
say("#{statement} ", color)
|
10
|
+
|
11
|
+
require "Win32API"
|
12
|
+
char = nil
|
13
|
+
password = ''
|
14
|
+
|
15
|
+
while char = Win32API.new("crtdll", "_getch", [ ], "L").Call do
|
16
|
+
break if char == 10 || char == 13 # received carriage return or newline
|
17
|
+
if char == 127 || char == 8 # backspace and delete
|
18
|
+
password.slice!(-1, 1)
|
19
|
+
else
|
20
|
+
# windows might throw a -1 at us so make sure to handle RangeError
|
21
|
+
(password << char.chr) rescue RangeError
|
22
|
+
end
|
23
|
+
end
|
24
|
+
puts
|
25
|
+
return password
|
26
|
+
end
|
27
|
+
|
28
|
+
else
|
29
|
+
|
30
|
+
def ask_passwordly(statement, color = nil)
|
31
|
+
system "stty -echo"
|
32
|
+
password = ask(statement, color)
|
33
|
+
puts
|
34
|
+
return password
|
35
|
+
ensure
|
36
|
+
system "stty echo"
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
data/lib/pullentity-client.rb
CHANGED
@@ -11,6 +11,26 @@ require 'erubis'
|
|
11
11
|
require 'nokogiri'
|
12
12
|
require 'json'
|
13
13
|
|
14
|
+
require 'tempfile'
|
15
|
+
require 'pullentity-client/thor/shell/password'
|
16
|
+
|
17
|
+
Thor::Shell::Basic.class_eval do
|
18
|
+
include Thor::Shell::Password
|
19
|
+
|
20
|
+
def ask(statement, *args)
|
21
|
+
options = args.last.is_a?(Hash) ? args.pop : {}
|
22
|
+
|
23
|
+
if options[:limited_to]
|
24
|
+
ask_filtered(statement, options[:limited_to], *args)
|
25
|
+
elsif options[:password]
|
26
|
+
ask_passwordly(statement, *args)
|
27
|
+
else
|
28
|
+
ask_simply(statement, *args)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
|
14
34
|
module Pullentity
|
15
35
|
module Client
|
16
36
|
ROOT_PATH = Pathname(__FILE__).dirname.expand_path
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pullentity-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- miguel michelson
|
@@ -280,6 +280,9 @@ files:
|
|
280
280
|
- lib/pullentity-client/templates/defaults/test-data.js.erb
|
281
281
|
- lib/pullentity-client/templates/rakefile
|
282
282
|
- lib/pullentity-client/templates/specs/app_spec.coffee.erb
|
283
|
+
- lib/pullentity-client/thor/.DS_Store
|
284
|
+
- lib/pullentity-client/thor/shell/basic.rb
|
285
|
+
- lib/pullentity-client/thor/shell/password.rb
|
283
286
|
- lib/pullentity-client/utils.rb
|
284
287
|
- lib/pullentity-client/version.rb
|
285
288
|
- pullentity-client.gemspec
|