MrMurano 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9cdab14d225467714facd44a4d7b3fcc53c3dfc3
4
- data.tar.gz: 8fadfeb1b2d620d60e3d4c25ac700e1f7b26620c
3
+ metadata.gz: 30d48034f5391a6edaca9fbe64b6615b5d3224fa
4
+ data.tar.gz: f60967a24c13ba28b07e54d6c86bf5132be0017d
5
5
  SHA512:
6
- metadata.gz: 0e42baff308ccab92fab6bc3a5da37e06542e49f4e395e5708ee42bd45e2ec078276a7558277c09712660333021017d50e60510fb5df62d72de201f5cae51821
7
- data.tar.gz: 4e37aae02c0b344492bb034b525200ffcf6d4ed99ee043fd71e9bc9fd77c99d862f6f5c52579d2fbdc12e023f93fe3be92b928b560103065138d709d948a1e48
6
+ metadata.gz: 99a4c4bac57e8b288615b37f45e13e130818d8a5fe8b1022eca162d2e00763af5e690c90d94c51ec3938745cd232a01e44bfb3312d94f971f0b4052ec05c1cbf
7
+ data.tar.gz: f15d2379a7c6ac706dfc78c7b70eff1d5816345ff5dcba6a7a1b180f795a8960880822b0b62362877e9b708e647db0a86294b5f3e04c1d8eae63785836477a70
data/TODO.taskpaper CHANGED
@@ -1,14 +1,19 @@
1
1
 
2
2
  Commands:
3
+ - First time run needs to be smoothed out.
3
4
  - Status will show things have changes when they don’t.
4
5
  - Default for most commands should be -same @done(2016-08-02)
5
6
  - Add Diff Command @done(2016-07-27)
6
7
 
8
+ Account:
9
+ - Netrc library (or the netrc format) doesn't allow '#' in passwords.
10
+
7
11
  Endpoints:
8
12
  - Add support for multiple endpoints in one file (maybe)
9
13
  - Add directory support like in modules @done(2016-07-26)
10
14
 
11
15
  Files:
16
+ - Switch to mime-types v3
12
17
  - Fix upload. @done(2016-08-01)
13
18
  - Files won't update, they always delete then add. @done(2016-07-28)
14
19
 
@@ -28,6 +33,7 @@ Config:
28
33
 
29
34
  SolutionBase:
30
35
  - All network traffic is serialized. Make some parallel.
36
+ - Add the --curl verbose option.
31
37
  - Rebuild how local names and paths are computed from remote items. @done(2016-07-27)
32
38
 
33
39
  Bundles:
@@ -14,12 +14,12 @@ module MrMurano
14
14
  URI('https://' + $cfg['net.host'] + '/api:1/' + path.to_s)
15
15
  end
16
16
 
17
- def _password
17
+ def _loginInfo
18
18
  host = $cfg['net.host']
19
19
  user = $cfg['user.name']
20
20
  if user.nil? then
21
21
  user = ask("Account name: ")
22
- $cfg['user.name'] = user
22
+ $cfg.set('user.name', user, :user)
23
23
  end
24
24
  # Maybe in the future use Keychain. For now all in Netrc.
25
25
  # if (/darwin/ =~ RUBY_PLATFORM) != nil then
@@ -37,7 +37,10 @@ module MrMurano
37
37
  nrc[host] = user, pws
38
38
  nrc.save
39
39
  end
40
- pws
40
+ {
41
+ :email => $cfg['user.name'],
42
+ :password => pws
43
+ }
41
44
  end
42
45
 
43
46
  def token
@@ -47,10 +50,7 @@ module MrMurano
47
50
  request = Net::HTTP::Post.new(r)
48
51
  request.content_type = 'application/json'
49
52
  #request.basic_auth(username(), password())
50
- request.body = JSON.generate({
51
- :email => $cfg['user.name'],
52
- :password => _password
53
- })
53
+ request.body = JSON.generate(_loginInfo)
54
54
 
55
55
  response = http.request(request)
56
56
  case response
@@ -28,6 +28,7 @@ module MrMurano
28
28
  self[:path] = Pathname.new(path) unless path.kind_of? Pathname
29
29
  self[:data] = IniFile.new(:filename=>path.to_s) if self[:data].nil?
30
30
  self[:data].save
31
+ path.chmod(0600)
31
32
  end
32
33
  end
33
34
 
@@ -1,4 +1,4 @@
1
1
  module MrMurano
2
- VERSION = '1.0.4'.freeze
2
+ VERSION = '1.0.5'.freeze
3
3
  end
4
4
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: MrMurano
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Conrad Tadpol Tilstra
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-03 00:00:00.000000000 Z
11
+ date: 2016-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commander