Skip to content

Commit 814e5e7

Browse files
committed
Mimic CLI behavior to node, python or other repls, update doc and versions of npm and pip package.
1 parent 4dd06b2 commit 814e5e7

File tree

6 files changed

+11
-15
lines changed

6 files changed

+11
-15
lines changed

source/examples/metacallcli/CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,16 +125,14 @@ install(TARGETS ${target}
125125
# Define test
126126
#
127127

128-
set(TEST_COMMAND_LINE_ARGS "test.mock")
129-
130128
if(WIN32)
131129
set(TEST_COMMAND cmd /c)
132130
else()
133131
set(TEST_COMMAND sh -c)
134132
endif()
135133

136134
add_test(NAME ${target}
137-
COMMAND ${TEST_COMMAND} "echo 'inspect\nexit' | $<TARGET_FILE:${target}> ${TEST_COMMAND_LINE_ARGS}"
135+
COMMAND ${TEST_COMMAND} "echo 'load mock a.mock\ninspect\nexit' | $<TARGET_FILE:${target}>"
138136
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
139137
)
140138

source/examples/metacallcli/application.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -341,10 +341,8 @@ void application::parameter_iterator::operator()(const char * parameter)
341341

342342
const std::string tag = extension_to_tag[script.substr(script.find_last_of(".") + 1)];
343343

344-
if (!app.load(tag, script))
345-
{
346-
app.shutdown();
347-
}
344+
app.load(tag, script);
345+
app.shutdown();
348346
}
349347

350348
bool application::load(const std::string & tag, const std::string & script)

source/ports/node_port/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ Install MetaCall binaries first:
1515
curl -sL https://raw.githubusercontent.com/metacall/install/master/install.sh | bash
1616
```
1717

18-
Then install NodeJS package:
18+
Then install MetaCall NodeJS package through MetaCall:
1919
```bash
20-
metacall install node metacall
20+
metacall npm install metacall
2121
```
2222

2323
# Example
@@ -38,5 +38,5 @@ metacall('sum', 3, 4); // 7
3838
```
3939

4040
``` sh
41-
metacall load node main.js
41+
metacall main.js
4242
```

source/ports/node_port/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "metacall",
3-
"version": "0.1.8",
3+
"version": "0.1.9",
44
"description": "Call Python, C#, Ruby... functions from NodeJS (a NodeJS Port for MetaCall)",
55
"repository": "github:metacall/core",
66
"bugs": "https://github.com/metacall/core/issues",

source/ports/py_port/package/README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ Install MetaCall binaries first:
2121
2222
curl -sL https://raw.githubusercontent.com/metacall/install/master/install.sh | bash
2323
24-
Then install Python package through MetaCall:
24+
Then install MetaCall Python package through MetaCall:
2525

2626
.. code:: console
2727
28-
metacall install py metacall
28+
metacall pip3 install metacall
2929
3030
Example
3131
========
@@ -52,4 +52,4 @@ Running the example:
5252

5353
.. code:: console
5454
55-
metacall load py main.py
55+
metacall main.py

source/ports/py_port/package/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
# Versions should comply with PEP440. For a discussion on single-sourcing
4040
# the version across setup.py and the project code, see
4141
# https://packaging.python.org/en/latest/single_source_version.html
42-
'version': '0.1.17',
42+
'version': '0.1.18',
4343

4444
'description': 'A library for providing inter-language foreign function interface calls',
4545
'long_description': long_description,

0 commit comments

Comments
 (0)