pullentity-client 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZjQ3ZGIxNmY5MDA4MzY4MzZjMjAzMmNlMjM3ZDNlNmY3OGNmM2FmOQ==
4
+ YzFiMjBiZTFiMjEzZWJkYmE3OGZiNTQzNGVhNDBhNzE4MDJhODhiMQ==
5
5
  data.tar.gz: !binary |-
6
- MGVmNjAyNjFkMDk3YTFjMGRjODgyMjY4OTRhN2U4MTI4MjliNjNiNQ==
6
+ MzRkMTEyNzJkNDU0OGUzYzRiYTMyNTQ2NWIxNjYyMGRkMDQ3ZmJjMQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZmRkMzFhYWI3ZTNiODUzMDdjN2NmZWYwZmE1OWI5ZDJlYzIzMjMxNjJiMzY1
10
- N2RhOWYyNGI1NjY5YTQ3ZDFiN2U0OTdlMjZhZjU1NmUxMjc4Mzc3MmJiOThi
11
- NTQxYTM5YWZhNWI3MzkzZTdmMWJkYzY3NjFlMDRmNWE1YjYzNzg=
9
+ ZWQzYjMxNTdlNmQ3Yjc2MDFjMzdhZTcxZTc3NjRiNjgzOTVjZDc4YmY1ZDk0
10
+ Yjk0NjU0YTQ3YzcwMGRjZmI2M2JjNDkwOGYwNTYyNGQ1MzkzYTgwMjExODI1
11
+ NzkwNGMwNjdhNzhlZTIwM2Q4ZDQ4ODE5MzdkZmYwODQ4NGE2ODA=
12
12
  data.tar.gz: !binary |-
13
- YWFmMGRhY2U5Yjg3YTcwMTFhMTI5NWYyNDI4NjQzODI3MmJhNGNkODk3Nzc4
14
- YjY1MDdiMjM5Nzk2MmRjMzE4OGNhNGI5Yzc2NWNjMjUwMzcyOGU3MzQwMTFm
15
- YTc2YTMxYzM0OThlMDQzZDI3Yjg3YmZlNDg5ZWYxNzk0NDVjYTk=
13
+ ZjBjNWE5OGVmYmRmNjA4NTIyZDE2MWNiN2MyMDE2MTBmMTkxZWEyYWQzMWYy
14
+ NTE1Y2E5ZTMwOWJmNjY2ZTc1MGNiMDAxZTc0NDI0NWI2ZDBhZGYwYWViMTE0
15
+ OWYzYmY5OGQwZjVjYWI3MDhhMmM2ZDA3MGMxNWQxOTQ3ZDkzNTM=
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Pullentity::Client
2
2
 
3
- TODO: Write a gem description
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
- TODO: Write usage instructions here
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)
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Pullentity
2
2
  module Client
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
@@ -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.1
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