pry-theme 0.0.1.pre → 0.0.3.pre
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.
- data/.gitignore +1 -0
- data/CHANGELOG.md +14 -0
- data/lib/pry-theme/version.rb +1 -1
- data/lib/pry-theme/when_started_hook.rb +1 -1
- data/lib/pry-theme.rb +18 -1
- metadata +2 -1
data/.gitignore
CHANGED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
Pry Theme changelog
|
2
|
+
===================
|
3
|
+
|
4
|
+
### v0.0.3.pre (June 26, 2012)
|
5
|
+
|
6
|
+
* Added support for Mac OS and Windows (I believe so, at least).
|
7
|
+
|
8
|
+
### v0.0.2.pre (June 26, 2012)
|
9
|
+
|
10
|
+
* Fixed bug with wrong detection of the root directory of the project.
|
11
|
+
|
12
|
+
### v0.0.1.pre (June 26, 2012)
|
13
|
+
|
14
|
+
* Initial release.
|
data/lib/pry-theme/version.rb
CHANGED
@@ -6,7 +6,7 @@ module PryTheme
|
|
6
6
|
def call(target, options, _pry_)
|
7
7
|
Dir.mkdir(THEME_DIR) unless Dir.exists?(THEME_DIR)
|
8
8
|
|
9
|
-
(Dir.entries(
|
9
|
+
(Dir.entries(EXAMPLES_ROOT) - %w{ . .. }).each do |f|
|
10
10
|
unless File.exists?(File.join(THEME_DIR, f))
|
11
11
|
FileUtils.cp(File.join("examples", f), THEME_DIR)
|
12
12
|
end
|
data/lib/pry-theme.rb
CHANGED
@@ -8,7 +8,24 @@ require 'psych'
|
|
8
8
|
|
9
9
|
module PryTheme
|
10
10
|
|
11
|
-
|
11
|
+
# The root path for PryTheme source codes.
|
12
|
+
ROOT = File.expand_path(File.dirname(__FILE__))
|
13
|
+
|
14
|
+
# The root path for PryTheme examples.
|
15
|
+
EXAMPLES_ROOT = File.join(ROOT, "..", "examples")
|
16
|
+
|
17
|
+
# The root path for the directory with configuration files for OS you're using.
|
18
|
+
CONFIG_DIR = case RbConfig::CONFIG["host_os"]
|
19
|
+
when /darwin/
|
20
|
+
File.join(ENV["HOME"], "Library", "Application Support")
|
21
|
+
when /linux/
|
22
|
+
ENV["XDG_CONFIG_HOME"]
|
23
|
+
when /mingw|mswin/
|
24
|
+
ENV["APPDATA"]
|
25
|
+
end
|
26
|
+
|
27
|
+
# Pry themes' directory.
|
28
|
+
THEME_DIR = File.join(CONFIG_DIR, "pry-theme")
|
12
29
|
|
13
30
|
Setter = proc do |theme_name|
|
14
31
|
::CodeRay::Encoders::Terminal::TOKEN_COLORS.merge!(PryTheme.convert(theme_name))
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pry-theme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3.pre
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -34,6 +34,7 @@ extensions: []
|
|
34
34
|
extra_rdoc_files: []
|
35
35
|
files:
|
36
36
|
- .gitignore
|
37
|
+
- CHANGELOG.md
|
37
38
|
- LICENSE
|
38
39
|
- README.md
|
39
40
|
- examples/pry-classic.prytheme
|