repla 0.7.5 → 0.7.6
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.
- checksums.yaml +4 -4
- data/lib/repla/dependencies/lib/view.rb +2 -2
- data/lib/repla/lib/constants.rb +2 -1
- data/lib/repla/lib/window.rb +5 -0
- data/lib/repla/logger/test/Rakefile +1 -1
- data/lib/repla/logger/test/lib/log_helper.rb +1 -1
- data/lib/repla/repl/lib/view.rb +2 -2
- data/lib/repla/resources/js/bullets/test/run_tests.rb +1 -1
- data/lib/repla/test/bundles/Invalid.replabundle/Contents/Info.plist +0 -2
- data/lib/repla/test/bundles/Print.replabundle/Contents/Info.plist +3 -1
- data/lib/repla/test/bundles/Print.replabundle/Contents/Resources/lib/view.rb +2 -2
- data/lib/repla/test/bundles/TestEnvironment.replabundle/Contents/Resources/test_environment.rb +2 -2
- data/lib/repla/test/bundles/TestLog.replabundle/Contents/Info.plist +4 -2
- data/lib/repla/test/lib/helper.rb +1 -1
- data/lib/repla/test.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c72e73d79cff76465943bb098df3779b8aceff0
|
4
|
+
data.tar.gz: 34cc04c304b326bc7b5b65f09b8966a09b646ea6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: edca9c72ba62782e2a0633873b967df2cc877460e15667c1e9998ea423186b8581d8e54683568ca7254b9a869e34eac86a2be9dce2c1039146ad505d7a50e7e8
|
7
|
+
data.tar.gz: 2ca6c5f16a6ad91c53db56a79a01c548887ce6cea3084e705a3bf376946a773b86125839611edf7f0ea95bbe56c8dadd9a8cb714428fb17a09b23a7f0a79e3a8
|
@@ -2,8 +2,8 @@ module Repla
|
|
2
2
|
module Dependencies
|
3
3
|
# Dependency view
|
4
4
|
class View < Repla::View
|
5
|
-
ROOT_ACCESS_DIRECTORY = File.join(
|
6
|
-
HTML_DIRECTORY = File.join(
|
5
|
+
ROOT_ACCESS_DIRECTORY = File.join(__dir__, '../../')
|
6
|
+
HTML_DIRECTORY = File.join(__dir__, '../html/')
|
7
7
|
VIEW_TEMPLATE = File.join(HTML_DIRECTORY, 'index.html')
|
8
8
|
|
9
9
|
def initialize
|
data/lib/repla/lib/constants.rb
CHANGED
@@ -3,7 +3,8 @@ module Repla
|
|
3
3
|
PLUGIN_NAME_KEY = 'WC_PLUGIN_NAME'.freeze
|
4
4
|
SPLIT_ID_KEY = 'WC_SPLIT_ID'.freeze
|
5
5
|
WINDOW_ID_KEY = 'WC_WINDOW_ID'.freeze
|
6
|
+
DARK_MODE_KEY = 'WC_DARK_MODE'.freeze
|
6
7
|
|
7
8
|
# Directories
|
8
|
-
APPLESCRIPT_DIRECTORY = File.join(
|
9
|
+
APPLESCRIPT_DIRECTORY = File.join(__dir__, '../../applescript')
|
9
10
|
end
|
data/lib/repla/lib/window.rb
CHANGED
@@ -15,6 +15,11 @@ module Repla
|
|
15
15
|
@window_id ||= ENV.key?(key) ? ENV[key] : Repla.create_window
|
16
16
|
end
|
17
17
|
|
18
|
+
def dark_mode
|
19
|
+
key = DARK_MODE_KEY
|
20
|
+
@dark_mode ||= ENV.key?(key) ? ENV[key].to_i > 0 : false
|
21
|
+
end
|
22
|
+
|
18
23
|
# Web
|
19
24
|
|
20
25
|
LOAD_SCRIPT = File.join(APPLESCRIPT_DIRECTORY, 'load.scpt')
|
@@ -8,7 +8,7 @@ module Repla
|
|
8
8
|
TEST_MESSAGE_JAVASCRIPT = 'document.body.lastChild.innerText'.freeze
|
9
9
|
TEST_MESSAGE_COUNT_JAVASCRIPT = 'document.body.children.length'.freeze
|
10
10
|
|
11
|
-
TEST_JAVASCRIPT_DIRECTORY = File.join(
|
11
|
+
TEST_JAVASCRIPT_DIRECTORY = File.join(__dir__, '..', 'js')
|
12
12
|
TEST_JAVASCRIPT_FILE = File.join(TEST_JAVASCRIPT_DIRECTORY,
|
13
13
|
'test_view_helper.js')
|
14
14
|
def initialize(window_id, view_id)
|
data/lib/repla/repl/lib/view.rb
CHANGED
@@ -2,8 +2,8 @@ module Repla
|
|
2
2
|
module REPL
|
3
3
|
# REPL view
|
4
4
|
class View < Repla::View
|
5
|
-
ROOT_ACCESS_DIRECTORY = File.join(
|
6
|
-
HTML_DIRECTORY = File.join(
|
5
|
+
ROOT_ACCESS_DIRECTORY = File.join(__dir__, '../../')
|
6
|
+
HTML_DIRECTORY = File.join(__dir__, '../html/')
|
7
7
|
VIEW_TEMPLATE = File.join(HTML_DIRECTORY, 'index.html')
|
8
8
|
def initialize
|
9
9
|
super
|
@@ -8,9 +8,11 @@
|
|
8
8
|
<string>print.rb</string>
|
9
9
|
<key>WCUUID</key>
|
10
10
|
<string>33EE3C86-3377-4F6D-B8FB-89B9539152AA</string>
|
11
|
+
<key>WCEditable</key>
|
12
|
+
<integer>0</integer>
|
11
13
|
<key>WCDebugModeEnabled</key>
|
12
14
|
<integer>0</integer>
|
13
|
-
<key>
|
15
|
+
<key>WCAutoShowLog</key>
|
14
16
|
<integer>0</integer>
|
15
17
|
</dict>
|
16
18
|
</plist>
|
@@ -2,9 +2,9 @@ module Repla
|
|
2
2
|
module Print
|
3
3
|
# Print view
|
4
4
|
class View < Repla::View
|
5
|
-
ROOT_ACCESS_DIRECTORY = File.join(
|
5
|
+
ROOT_ACCESS_DIRECTORY = File.join(__dir__,
|
6
6
|
'../../../../../../')
|
7
|
-
HTML_DIRECTORY = File.join(
|
7
|
+
HTML_DIRECTORY = File.join(__dir__, '../html/')
|
8
8
|
VIEW_TEMPLATE = File.join(HTML_DIRECTORY, 'index.html')
|
9
9
|
|
10
10
|
def initialize
|
data/lib/repla/test/bundles/TestEnvironment.replabundle/Contents/Resources/test_environment.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
#!/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
|
2
2
|
|
3
|
-
require '
|
3
|
+
require 'test/unit'
|
4
4
|
|
5
5
|
require_relative '../../../../../../repla'
|
6
6
|
require_relative 'constants'
|
7
7
|
require_relative '../../../../../lib/escape'
|
8
8
|
|
9
9
|
# Test environment
|
10
|
-
class TestEnviroment <
|
10
|
+
class TestEnviroment < Test::Unit::TestCase
|
11
11
|
using Escape
|
12
12
|
def test_plugin_name_key
|
13
13
|
assert(ENV.key?(Repla::PLUGIN_NAME_KEY))
|
@@ -8,9 +8,11 @@
|
|
8
8
|
<string>test_log.rb</string>
|
9
9
|
<key>WCUUID</key>
|
10
10
|
<string>7A95638E-798D-437C-9404-08E7DC68655B</string>
|
11
|
-
<key>WCDebugModeEnabled</key>
|
12
|
-
<integer>1</integer>
|
13
11
|
<key>WCEditable</key>
|
14
12
|
<integer>0</integer>
|
13
|
+
<key>WCDebugModeEnabled</key>
|
14
|
+
<integer>1</integer>
|
15
|
+
<key>WCAutoShowLog</key>
|
16
|
+
<integer>1</integer>
|
15
17
|
</dict>
|
16
18
|
</plist>
|
data/lib/repla/test.rb
CHANGED
@@ -7,12 +7,12 @@ module Repla
|
|
7
7
|
POLLING_INTERVAL = 0.5
|
8
8
|
|
9
9
|
# Ruby
|
10
|
-
REPLA_FILE = File.join(
|
11
|
-
TEST_DIRECTORY = File.join(
|
10
|
+
REPLA_FILE = File.join(__dir__, '../repla')
|
11
|
+
TEST_DIRECTORY = File.join(__dir__, 'test')
|
12
12
|
LIB_DIRECTORY = File.join(TEST_DIRECTORY, 'lib')
|
13
13
|
HELPER_FILE = File.join(LIB_DIRECTORY, 'helper')
|
14
14
|
VIEW_HELPER_FILE = File.join(LIB_DIRECTORY, 'view_helper')
|
15
|
-
LOG_HELPER_FILE = File.join(
|
15
|
+
LOG_HELPER_FILE = File.join(__dir__,
|
16
16
|
'logger/test/lib/log_helper')
|
17
17
|
|
18
18
|
# Test Assets
|