lb-project 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lb/project.rb +3 -0
- data/lib/lb/project/api.rb +70 -0
- data/lib/lb/project/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f1933319af3ce3333456607636bcc90c5bdef86ff4f566564bcddb87f04d5bf
|
4
|
+
data.tar.gz: 1324cbf4adfe901a4daca6717a018844f7545c6f17b598ffdfee528e3c3667fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ffbba086fb2ab6171d9cf8deb20f443cb78aa6b60e544bec681c7c1719a950b387a8db820e62e972269d498de4bf03d82c1f966174a747069642e7e3da71417
|
7
|
+
data.tar.gz: f97fd83b3efc966484ca78d599140069081863fe8335528deb71a7aa657af65c94ceabaf5fc2f4843cde065ed625844663fbce1e8b680ed449566772e0a5d1b6
|
data/lib/lb/project.rb
CHANGED
@@ -0,0 +1,70 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module LB
|
4
|
+
module Project
|
5
|
+
# LB::Project API
|
6
|
+
module API
|
7
|
+
# Get root path
|
8
|
+
#
|
9
|
+
# @return [dir_name]
|
10
|
+
#
|
11
|
+
# @api private
|
12
|
+
#
|
13
|
+
def root
|
14
|
+
LB::Project.root
|
15
|
+
end
|
16
|
+
|
17
|
+
# Get root path for file
|
18
|
+
#
|
19
|
+
# @param [File] file The file to get the root path from
|
20
|
+
# @param [File] depth The depth of the given file relative from the root
|
21
|
+
# directory
|
22
|
+
#
|
23
|
+
# @return [dir_name]
|
24
|
+
#
|
25
|
+
# @api private
|
26
|
+
#
|
27
|
+
def root_for(file, depth = 2)
|
28
|
+
LB::Project.root_for(file, depth)
|
29
|
+
end
|
30
|
+
|
31
|
+
# Get template path
|
32
|
+
#
|
33
|
+
# @return [dir_name]
|
34
|
+
#
|
35
|
+
# @api private
|
36
|
+
#
|
37
|
+
def self.template_path
|
38
|
+
LB::Project.template_path
|
39
|
+
end
|
40
|
+
|
41
|
+
# Get public path
|
42
|
+
#
|
43
|
+
# @return [dir_name]
|
44
|
+
#
|
45
|
+
# @api private
|
46
|
+
#
|
47
|
+
def self.public_path
|
48
|
+
LB::Project.public_path
|
49
|
+
end
|
50
|
+
|
51
|
+
# Get main configuration
|
52
|
+
#
|
53
|
+
# @return [Config]
|
54
|
+
#
|
55
|
+
# @api private
|
56
|
+
#
|
57
|
+
def self.config
|
58
|
+
LB::Project.config
|
59
|
+
end
|
60
|
+
|
61
|
+
def self.t(*params)
|
62
|
+
LB::Project.t(*params)
|
63
|
+
end
|
64
|
+
|
65
|
+
def self.logger
|
66
|
+
LB::Project.logger
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
data/lib/lb/project/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lb-project
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Firas Zaidan
|
@@ -227,6 +227,7 @@ files:
|
|
227
227
|
- lb-project.gemspec
|
228
228
|
- lib/lb-project.rb
|
229
229
|
- lib/lb/project.rb
|
230
|
+
- lib/lb/project/api.rb
|
230
231
|
- lib/lb/project/app.rb
|
231
232
|
- lib/lb/project/config.rb
|
232
233
|
- lib/lb/project/page.rb
|