siteleaf 2.2.0 → 2.2.1

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
  SHA256:
3
- metadata.gz: 046b60a59a32c75e4294c753c2593933a1cc4c7f4bd631d063680810f9c9c4ac
4
- data.tar.gz: d5d9312cab00db6b14ad706420649f008bd12382d1a54f3ef030fb90601c0024
3
+ metadata.gz: ce6fc710cfc1acbebaf8d32fd7b2fd8a71d4214a927f3044123f83379edd39ca
4
+ data.tar.gz: 230fb95a0b07b80a64bfe9327ea91a29c7666bbb30451f213c54954b1363e32d
5
5
  SHA512:
6
- metadata.gz: e1c28c75af43d0c5472d721dc228c76c553d3f1aecc688c0911862b226ddacb080d09f7d3051fd3f9daa92b1bccb313006ea717dc5846ccdd0d632b89a84037e
7
- data.tar.gz: d6a2293493b93183677f2e287adcdd5be234c7a2115fda7d78461722bd2537c0e4cb3adfba55a8caef5a3e344e5baf1f3ddb3ec272db69a854d05eaff0623746
6
+ metadata.gz: ea19934dd0aea81f63d0e92369d757888011cbd951c015b7e69de6b3813e3774e69fd5bcff527b9207f610b29f7a1f4bd1ba894e99342090e273b539bbd4a5f9
7
+ data.tar.gz: 0a72065cf23659cbe5efa2beea7590588bcd22235ce00f42e4be3a3fb4084ab5671f258dd025427e2db48cb4690d11d29635a5f8a2a2617cd628b5093e64d380
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  <img alt="Siteleaf" src="https://learn.siteleaf.com/assets/images/logo.svg" width="10%">
2
2
 
3
- Siteleaf v2 Gem
4
- ===============
3
+ Siteleaf v2 Gem & CLI
4
+ =====================
5
5
 
6
6
  - [Prerequisites](#prerequisites)
7
7
  - [Installation](#installation)
@@ -0,0 +1,12 @@
1
+ module Siteleaf
2
+ class Role < Entity
3
+
4
+ attr_accessor :kind, :user_id, :site_id
5
+ attr_reader :id, :created_at, :updated_at
6
+
7
+ def create_endpoint
8
+ "sites/#{site_id}/roles"
9
+ end
10
+
11
+ end
12
+ end
data/lib/siteleaf/site.rb CHANGED
@@ -48,6 +48,11 @@ module Siteleaf
48
48
  Job.new(id: result["job_id"]) if result
49
49
  end
50
50
 
51
+ def users
52
+ result = Client.get "#{entity_endpoint}/users"
53
+ result.map { |r| User.new(r) } if result.is_a? Array
54
+ end
55
+
51
56
  def full_url
52
57
  "http://#{domain}"
53
58
  end
@@ -1,3 +1,3 @@
1
1
  module Siteleaf
2
- VERSION = "2.2.0"
2
+ VERSION = "2.2.1"
3
3
  end
data/lib/siteleaf.rb CHANGED
@@ -14,6 +14,7 @@ require 'siteleaf/document'
14
14
  require 'siteleaf/site'
15
15
  require 'siteleaf/source_file'
16
16
  require 'siteleaf/user'
17
+ require 'siteleaf/role'
17
18
  require 'digest/sha1'
18
19
  require 'rbconfig'
19
20
  require 'uri'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: siteleaf
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Siteleaf
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-20 00:00:00.000000000 Z
11
+ date: 2023-11-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -91,6 +91,7 @@ files:
91
91
  - lib/siteleaf/git_hash.rb
92
92
  - lib/siteleaf/job.rb
93
93
  - lib/siteleaf/page.rb
94
+ - lib/siteleaf/role.rb
94
95
  - lib/siteleaf/site.rb
95
96
  - lib/siteleaf/source_file.rb
96
97
  - lib/siteleaf/user.rb